<?php
namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Forms;
use ModulesGarden\Servers\ZimbraEmail\App\Libs\Product\ProductManager;
use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Models\ClassOfService;
use ModulesGarden\Servers\ZimbraEmail\App\Libs\Zimbra\Components\Api\Soap\Repository\ClassOfServices;
use ModulesGarden\Servers\ZimbraEmail\App\Traits\FormExtendedTrait;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Sections\RowSection;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Providers\AccountDataProvider;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Sections\AdditionalSection;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Sections\GeneralSection;
use ModulesGarden\Servers\ZimbraEmail\App\Validators\PasswordsValidator;
use ModulesGarden\Servers\ZimbraEmail\App\Validators\RepeatPasswordValidator;
use function ModulesGarden\Servers\ZimbraEmail\Core\Helper\di;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Hidden;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Password;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Select;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Text;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\FormConstants;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Sections\InputGroup;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\InputGroupElements;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Sections\RawSection;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 10.09.19
 * Time: 13:06
 * Class AddAccountForm
 */
class AddAccountForm extends SortedFieldForm implements ClientArea
{
    use FormExtendedTrait;

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

    public function initContent()
    {
        $this->setFormType(FormConstants::CREATE);
        $this->setProvider(new AccountDataProvider());
        $this->initFields();
        $this->loadDataToForm();
    }

    public function initFields()
    {
        $this->addSection(new GeneralSection());
        $this->addSection(new AdditionalSection());


    }
}