<?php

$mailstats_links = [
    [
        "page_id" => "mail_stats_received",
        "text" => "ලිපි ලැබීම",
        "link" => "received"
    ], [
        "page_id" => "mail_stats_sender",
        "text" => "ලිපි එවූ ආයතන",
        "link" => "sender"
    ], [
        "page_id" => "mail_stats_recorded",
        "text" => "ලේඛනගත කිරීම",
        "link" => "recorded"
    ], [
        "page_id" => "mail_stats_forwarding",
        "text" => "අංශ වෙත යොමුකිරීම",
        "link" => "forwarded"
    ], [
        "page_id" => "mail_stats_assigned",
        "text" => "විෂය නිලධාරීන්",
        "link" => "assigned"
    ]
];

?>


<div class="toolbar">

    <div class="pill-group center">

        <?php

        foreach ($mailstats_links as $key => $value) { ?>

            <a href="/<?= SUBFOLDER ?>modules/mail/statistics/<?= $value["link"] ?>. " class="pill <?= page::get("page_id") == $value["page_id"] ? "active" : ""  ?>">
                <span class="pill-text"><?= $value["text"]  ?></span>
            </a>

        <?php } ?>

    </div>

</div>