<?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: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('zimbraFeatureMailPriorityEnabled');
        $left->addField($field);

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

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

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

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

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

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

        return $left;
    }

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

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

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

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

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

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

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

        return $right;

    }

}