<?php

/**
 * Mail sections navigation tabs.
 *
 * @var string $active Active section key
 */

$active ??= '';

$tabs = [
    'incoming'  => ['name' => __('Incoming messages'), 'url' => '/mail/incoming'],
    'outgoing'  => ['name' => __('Sent messages'), 'url' => '/mail/outgoing'],
    'files'     => ['name' => __('Files'), 'url' => '/mail/files'],
    'contacts'  => ['name' => __('Contacts'), 'url' => '/mail/contacts'],
    'blocklist' => ['name' => __('Blacklist'), 'url' => '/mail/blocklist'],
];
?>
<div class="mb-2">
    <?php foreach ($tabs as $key => $tab): ?>
        <a href="<?= $this->e($tab['url']) ?>" class="btn btn-outline-secondary mb-1 <?= ($key === $active ? 'active' : '') ?>"><?= $this->e($tab['name']) ?></a>
    <?php endforeach; ?>
</div>
