<?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 GeneralFeatures
 */
class GeneralFeatures extends BoxSectionExtended implements AdminArea
{
    protected $id       = 'generalFeatures';
    protected $name     = 'generalFeatures';
    protected $title    = 'generalFeatures';

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

    /**
     * @return HalfPageSection
     */
    public function getLeftSection()
    {
        $left = new HalfPageSection('generalFeaturesLeft');

        $field = new Switcher('kerioFeatureTaggingEnabled');
        $left->addField($field);

        $field = new Switcher('kerioFeatureChangePasswordEnabled');
        $left->addField($field);

        $field = new Switcher('kerioFeatureManageZimlets');
        $left->addField($field);

        $field = new Switcher('kerioFeatureGalEnabled');
        $left->addField($field);

        $field = new Switcher('kerioFeatureEwsEnabled');
        $left->addField($field);

        $field = new Switcher('kerioFeatureWebClientOfflineAccessEnabled');
        $left->addField($field);

        $field = new Switcher('kerioFeatureImportFolderEnabled');
        $left->addField($field);

        $field = new Switcher('kerioDumpsterEnabled');
        $left->addField($field);

        return $left;

    }

    /**
     * @return HalfPageSection
     */
    public function getRightSection()
    {
        $right = new HalfPageSection('generalFeaturesRight');

        $field = new Switcher('kerioFeatureSharingEnabled');
        $right->addField($field);

        $field = new Switcher('kerioFeatureSkinChangeEnabled');
        $right->addField($field);

        $field = new Switcher('kerioFeatureHtmlComposeEnabled');
        $right->addField($field);

        $field = new Switcher('kerioFeatureMAPIConnectorEnabled');
        $right->addField($field);

        $field = new Switcher('kerioFeatureTouchClientEnabled');
        $right->addField($field);

        $field = new Switcher('kerioFeatureGalAutoCompleteEnabled');
        $right->addField($field);

        $field = new Switcher('kerioFeatureExportFolderEnabled');
        $right->addField($field);

        $field = new Switcher('kerioDumpsterPurgeEnabled');
        $right->addField($field);

        return $right;
    }

}