<?php

namespace ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Buttons;

use \ModulesGarden\HostingQuotaNotifications\Core\UI\Interfaces\AjaxElementInterface;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Modals\ExampleModal;

/**
 * base button controller
 *
 * @author Sławomir Miśkowicz <slawomir@modulesgarden.com>
 */
class BaseModalDataTableActionButton extends BaseModalButton implements AjaxElementInterface
{
    use \ModulesGarden\HostingQuotaNotifications\Core\UI\Traits\DisableButtonByColumnValue;
    
    protected $id             = 'baseModalDataTableActionButton';
    protected $class          = ['btn btn-circle btn-outline btn-inverse btn-success btn-icon-only'];
    protected $icon           = 'fa fa-plus';
    protected $title          = 'baseModalDataTableActionButton';

    public function initContent()
    {
        $this->htmlAttributes['@click'] = 'loadModal($event, \'' . $this->id . '\')';

        $this->setModal(new ExampleModal());
    }
}
