<?php
namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Client\DistributionList\Sections;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Sections\FreeFieldsSection;
use ModulesGarden\Servers\ZimbraEmail\App\Validators\EmailValidator;
use ModulesGarden\Servers\ZimbraEmail\App\Validators\TaggerEmailValidator;
use function ModulesGarden\Servers\ZimbraEmail\Core\Helper\di;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Select;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Tagger;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Text;

/**
 * Class AddOwnersDistribuition
 * User: Nessandro
 * Date: 2019-09-20
 * Time: 12:43
 */

class AddOwnersDistribution extends FreeFieldsSection
{
    protected $id   = 'addOwnersDistribution';
    protected $name = 'addOwnersDistribution';

    public function initContent()
    {
        $this->addField(
            (new Tagger('owners'))
                ->setPlaceholder(di('lang')->absoluteT('mail@example.com'))
                ->addValidator(new TaggerEmailValidator())
        );

    }
}