<?php

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

use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Admin\Product\Sections\TwiceColumnSection;
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\Text;

class DefaultConfigurationSection extends TwiceColumnSection implements AdminArea
{
    protected $id = 'defaultConfigurationSection';
    protected $name = 'defaultConfigurationSection';
    protected $title = 'defaultConfigurationSection';

    protected function initFields()
    {
        //cpu
        $field = new Select('customconfigoption[cpu]');
        $field->setDescription('tip');
        $field->setDefaultValue('kvm64');
        $this->addField($field);
        //Number of CPU Sockets
        $field = new Text('customconfigoption[sockets]');
        $field->setDescription('tip');
        $field->setDefaultValue(10);
        $this->addField($field);
        //Number of Cores Per Socket
        $field = new Text('customconfigoption[cores]');
        $field->setDefaultValue(10);
        $field->setDescription('tip');
        $this->addField($field);
        //VCPUs
        $field = new Text('customconfigoption[vcpus]');
        $field->setDefaultValue(10);
        $field->setDescription('tip');
        $this->addField($field);
        //Limit of CPU
        $field = new Text('customconfigoption[cpulimit]');
        $field->setDefaultValue(10);
        $field->setDescription('tip');
        $this->addField($field);
        //CPU Weight For The VM
        $field = new Text('customconfigoption[cpuunits]');
        $field->setDefaultValue(10240);
        $field->setDescription('tip');
        $this->addField($field);
        //RAM For The VM
        $field = new Text('customconfigoption[memory]');
        $field->setDefaultValue(3000);
        $field->setDescription('tip');
        $this->addField($field);
        //Disk Space
        $field = new Text('customconfigoption[storageSize]');
        $field->setDescription('tip');
        $field->setDefaultValue(300);
        $this->addField($field);
        //Amount of IPv4 Addresses
        $field = new Text('customconfigoption[ipv4]');
        $field->setDescription('tip');
        $this->addField($field);
        //Amount of IPv6 Addresses
        $field = new Text('customconfigoption[ipv6]');
        $field->setDescription('tip');
        $this->addField($field);
        //Backups Size Limit
        $field = new Text('customconfigoption[backupMaxSize]');
        $field->setDescription('tip');
        $this->addField($field);
        //Backup Files Limit
        $field = new Text('customconfigoption[backupMaxFiles]');
        $field->setDescription('tip');
        $this->addField($field);
        //Bandwidth Limit
        $field = new Text('customconfigoption[bandwidth]');
        $field->setDescription('tip');
        $this->addField($field);
        //Snapshots Limit
        $field = new Text('customconfigoption[snapshotMaxFiles]');
        $field->setDescription('tip');
        $this->addField($field);
        //Private Network Limit
        $field = new Text('customconfigoption[virtualNetworks]');
        $field->setDescription('tip');
        $field->setDefaultValue(1);
        $this->addField($field);
    }

}
