<?php

namespace ThurData\Servers\KerioEmail\App\UI\Client\Setting\Modals;

use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Forms\InfoForm;
use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ModalActionButtons\BaseCancelButton;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ModalActionButtons\BaseRedirectButton;
use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Modals\ModalExtendedTabsEdit;

class InfoModal extends ModalExtendedTabsEdit implements ClientArea
{

    protected $id    = 'infoModal';
    protected $name  = 'infoModal';
    protected $title = 'infoModal';

    public function initContent()
    {
        $this->initIds('infoModal');
        $this->addForm(new InfoForm());
    }

    protected function initActionButtons()
    {
        if (!empty($this->actionButtons))
        {
            return $this;
        }
        $this->addActionButton(new BaseCancelButton());
        $transferButton = new BaseRedirectButton('transferDomain');
        $transferButton->addHtmlAttribute('id', 'transferDomain');
        $this->addActionButton($transferButton);
        return $this;
    }
}