public function getAttributes():array
    {
        $attributes = $this->attributes;
        if ($this->cssClasses) {
            $attributes['class'] = implode(' ', array_keys($this->cssClasses));
        }
        if ($this->styles) {
            $attributes['style'] = implode(';', $this->styles);
        }
        return $attributes;
    }