<?php

namespace ThurData\Servers\KerioEmail\App\UI\Admin\ProductConfiguration\Pages\Sections;


use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\BoxSectionExtended;
use ThurData\Servers\KerioEmail\Core\UI\Interfaces\AdminArea;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Switcher;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\BoxSection;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;

/**
 *
 * Created by PhpStorm.
 * User: ThurData
 * Date: 29.08.19
 * Time: 08:33
 * Class EssentialFeatures
 */
class EssentialFeatures extends BoxSectionExtended implements AdminArea
{
    protected $id       = 'essentialFeatures';
    protected $name     = 'essentialFeatures';
    protected $title    = 'essentialFeatures';

    public function initContent()
    {
        $this
            ->addSection($this->getLeftSection())
            ->addSection($this->getRightSection());

    }
    public function getLeftSection()
    {
        $leftSection = new HalfPageSection('essentialFeaturesLeft');

        $field = new Switcher('kerioFeatureMailEnabled');
        //$field->setDescription('description');
        $leftSection->addField($field);

        $field = new Switcher('kerioFeatureCalendarEnabled');
        //$field->setDescription('description');
        $leftSection->addField($field);

        $field = new Switcher('kerioFeatureBriefcasesEnabled');
        //$field->setDescription('description');
        $leftSection->addField($field);

        return $leftSection;

    }

    public function getRightSection()
    {
        $right = new HalfPageSection('essentialFeaturesRight');

        $field = new Switcher('kerioFeatureContactsEnabled');
        //$field->setDescription('description');
        $right->addField($field);

        $field = new Switcher('kerioFeatureTasksEnabled');
        //$field->setDescription('description');
        $right->addField($field);

        $field = new Switcher('kerioFeatureOptionsEnabled');
        //$field->setDescription('description');
        $right->addField($field);

        return $right;
    }
}