<?php
$currentPage = basename($_SERVER['PHP_SELF']);
?>
<div class="topbar">
    <div>
        <span class="logo">⚡ FamAPI</span>
        <span class="admin-tag">ADMIN</span>
    </div>
    <div class="nav-links">
        <a href="dashboard.php" class="<?= $currentPage === 'dashboard.php' ? 'active' : '' ?>">📊 Overview</a>
        <a href="users.php" class="<?= $currentPage === 'users.php' || $currentPage === 'user_edit.php' ? 'active' : '' ?>">👥 Users</a>
        <a href="plans.php" class="<?= $currentPage === 'plans.php' ? 'active' : '' ?>">💎 Plan Editor</a>
        <a href="transactions.php" class="<?= $currentPage === 'transactions.php' ? 'active' : '' ?>">💰 Transactions</a>
        <a href="payment_links.php" class="<?= $currentPage === 'payment_links.php' ? 'active' : '' ?>">🔗 Payment Links</a>
        <a href="webhook_tester.php" class="<?= $currentPage === 'webhook_tester.php' ? 'active' : '' ?>">🪝 Webhooks</a>
        <a href="settings.php" class="<?= $currentPage === 'settings.php' ? 'active' : '' ?>">⚙️ Settings</a>
        <a href="../logout.php" class="logout-link">Logout</a>
    </div>
</div>
