<?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:34
 * Class MailServiceFeatures
 */
class MailServiceFeatures extends BoxSectionExtended implements AdminArea
{
    protected $id       = 'mailServiceFeatures';
    protected $name     = 'mailServiceFeatures';
    protected $title    = 'mailServiceFeatures';

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

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

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

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

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

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

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

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

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

        return $left;
    }

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

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

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

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

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

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

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

        return $right;

    }

}