<?php

namespace ModulesGarden\Servers\ProxmoxVps\App\UI\Admin\Product\Sections;

use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\AdminArea;
use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Select;
use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;

class ClientNotificationSection extends BoxSection implements AdminArea
{
    protected $id = 'clientNotificationSection';
    protected $name = 'clientNotificationSection';
    protected $title = 'clientNotificationSection';
    /**
     * @var HalfPageSection
     */
    private $leftSection;
    /**
     * @var HalfPageSection
     */
    private $rightSection;

    public function initContent()
    {
        $this->leftSection  = new HalfPageSection('leftSection');
        $this->rightSection = new HalfPageSection('rightSection');
        $this->addSection($this->leftSection)
            ->addSection($this->rightSection);
        $this->initFields();
    }

    private function initFields()
    {
        //Welcome Email
        $field = new Select('customconfigoption[welcomeEmailTemplateId]');
        $field->setDescription('tip');
        $this->leftSection->addField($field);
        //Reinstall
        $field = new Select('customconfigoption[reinstallEmailTemplateId]');
        $field->setDescription('tip');
        $this->rightSection->addField($field);

    }

}
