<?php

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


use ModulesGarden\Servers\ProxmoxCloudVps\Core\Lang\Lang;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\AdminArea;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Select;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Switcher;
use function ModulesGarden\Servers\ProxmoxCloudVps\Core\Helper\sl;

class MainSection extends TwiceColumnSection implements AdminArea
{
    protected $id = 'mainSection';
    protected $name = 'mainSection';
    protected $title = 'mainSection';


    protected function initFields()
    {
        /**
         * @var Lang $lang
         */
        $lang = sl("lang");
        //Virtualization
        $field = new Select('customconfigoption[virtualization]');
        $field->setDefaultValue('qemu');
        $field->setDescription('tip');
        $this->addField($field);
        //Default Node
        $field = new Select('customconfigoption[defaultNode]');
        $field->setDescription('tip');
        $this->addField($field);
        //Check Available Resources
        $field = new Switcher('customconfigoption[checkResources]');
        $field->setDescription('tip');
        $this->addField($field);
        //resetUsageFirstDayOfMonth
        $field = new Switcher('customconfigoption[resetUsageFirstDayOfMonth]');
        $field->setDescription('tip');
        $this->addField($field);
    }

}
