<?php

namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections;


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

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * 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('zimbraFeatureMailEnabled');
        //$field->setDescription('description');
        $leftSection->addField($field);

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

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

        return $leftSection;

    }

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

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

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

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

        return $right;
    }
}