<?php
$currentPage = basename($_SERVER["SCRIPT_NAME"] ?? "");
function subAdminNavActive($page, $currentPage) {
    return $page === $currentPage ? "active" : "";
}
?>
    </main>

    <div class="bottom-nav">
        <a class="<?= subAdminNavActive("dashboard.php", $currentPage) ?>" href="dashboard.php"><span class="nav-icon"><svg viewBox="0 0 24 24"><path d="M3 11l9-8 9 8"/><path d="M5 10v10h14V10"/><path d="M9 20v-6h6v6"/></svg></span><span>Home</span></a>
        <a class="<?= subAdminNavActive("add-visitor.php", $currentPage) ?>" href="add-visitor.php"><span class="nav-icon"><svg viewBox="0 0 24 24"><path d="M12 5v14"/><path d="M5 12h14"/></svg></span><span>Add</span></a>
        <a class="<?= subAdminNavActive("search-visitor.php", $currentPage) ?>" href="search-visitor.php"><span class="nav-icon"><svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/></svg></span><span>Search</span></a>
        <a class="<?= subAdminNavActive("my-visitors.php", $currentPage) ?>" href="my-visitors.php"><span class="nav-icon"><svg viewBox="0 0 24 24"><path d="M8 6h13"/><path d="M8 12h13"/><path d="M8 18h13"/><path d="M3 6h.01"/><path d="M3 12h.01"/><path d="M3 18h.01"/></svg></span><span>List</span></a>
        <a class="<?= subAdminNavActive("profile.php", $currentPage) ?>" href="profile.php"><span class="nav-icon"><svg viewBox="0 0 24 24"><path d="M20 21a8 8 0 0 0-16 0"/><circle cx="12" cy="7" r="4"/></svg></span><span>Profile</span></a>
    </div>
</div>

<script src="../assets/js/mobile-app.js"></script>
</body>
</html>
