<?php

namespace ModulesGarden\Servers\OpenXchange\App\Http\Client;

use ModulesGarden\Servers\OpenXchange\Core\Helper;
use ModulesGarden\Servers\OpenXchange\Core\UI\Traits\WhmcsParams;
use ModulesGarden\Servers\OpenXchange\Core\Http\AbstractClientController;
use ModulesGarden\Servers\OpenXchange\App\UI\Client\EmailAccount\Pages\EmailAccount as EmailAccountPage;
use ModulesGarden\Servers\OpenXchange\App\UI\Client\EmailAccount\Pages\EmailAccountDescription;

class EmailAccount extends AbstractClientController
{
    use WhmcsParams;

    public function index()
    {
        if ($this->getWhmcsParamByKey('status') === 'Active')
        {
            return Helper\view()
                ->addElement(EmailAccountDescription::class)
                ->addElement(EmailAccountPage::class);
        }
    }
}
