<?php

namespace App\Manager\Toolbar\Element;

class ToolbarButton extends AbstractToolbarElement
{
    protected array $data;

    public function __construct(string $icon, string $label, string $action, array $data = [])
    {
        parent::__construct($icon, $label, $action);
        $this->data = $data;
    }

    public function getType(): string
    {
        return 'button';
    }

    public function getAdditionalProperties(): array
    {
        return ['data' => $this->data];
    }
}
