<?php

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

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;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Textarea;

class UserSection extends TwiceColumnSection implements AdminArea
{
    protected $id = 'userSection';
    protected $name = 'userSection';
    protected $title = 'userSection';

    protected function initFields()
    {
        //Username Prefix
        $field = new Text('customconfigoption[userPrefix]');
        $field->setDescription('tip');
        $field->setDefaultValue('ProxmoxCloudVps_{$serviceid}');
        $this->addField($field);
        //Realm
        $field = new Select('customconfigoption[realm]');
        $field->setDescription('tip');
        $field->setDefaultValue('pve');
        $this->addField($field);
        //Comment
        $field = new Textarea('customconfigoption[userComment]');
        $field->setDescription('tip');
        $field->setDefaultValue('User from module ProxmoxCloudVps for WHMCS');
        $this->addField($field);
        //Role
        $field = new Select('customconfigoption[userRole]');
        $field->setDescription('tip');
        $field->setDefaultValue('PVEVMUser');
        $this->addField($field);
    }

}
