<?php
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
?>
<?= $this->partial('partials/tabs.phtml', array('tabs' => $this->tabs, 'renderTo' => 'main')) ?>
<?= $this->requireJs('views/smb/email-address/list', [
    'emailsList' => [
        'data' => $this->emailsList->fetchData(),
        'dataUrl' => "/email-address/list-data{$this->domainIdParam}",
        'searchFilters' => $this->emailsList->getSearchFilterConfig(),
    ],
    'urls' => [
        'edit' => "/email-address/edit/id/%%id%%{$this->domainIdParam}",
        'create' => "/email-address/create{$this->domainIdParam}",
        'recalculate-usage' => "/email-address/recalculate-usage{$this->domainIdParam}",
        'update-outgoing-messages' => "/email-address/update-outgoing-messages{$this->domainIdParam}",
        'delete' => "/email-address/delete/?redirect=/email-address/list{$this->domainIdParam}",
        'user' => $this->currentUser->hasPermission('userManagement')
            ? '/user/edit/id/%%id%%'
            : '/user/details/id/%%id%%',
    ],
    'maxBoxUsage' => $this->resourceUsage('max_box'),
    'isMailnameOutgoingSpamSettingsManagementAllowed' => $this->isMailnameOutgoingSpamSettingsManagementAllowed,
]) ?>
