<?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\Switcher;
use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;

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

    public function initContent()
    {
        $this->leftSection  = new HalfPageSection('leftSectionsdf');
        $this->rightSection = new HalfPageSection('rightSectionsdf');

        $this->addSection($this->leftSection)
            ->addSection($this->rightSection);
        $this->initFields();
    }

    private function initFields()
    {
        //One User Per VPS
        $field = new Switcher('customconfigoption[oneUserPerVps]');
        $field->setDescription('tip');
        $field->setDefaultValue("on");
        $this->leftSection->addField($field);
    }

}
