<?php
$currentPage = basename($_SERVER['PHP_SELF']);
?>

<!-- Main Sidebar -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">

    <!-- Brand Logo -->
    <a href="dashboard.php" class="brand-link text-center">
        <span class="brand-text font-weight-light" style="color:#C9A24D; font-family:'Playfair Display', serif;">
            Exclusive Concierge
        </span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">

        <!-- Sidebar Menu -->
        <nav class="mt-3">
            <ul class="nav nav-pills nav-sidebar flex-column nav-flat" data-widget="treeview" role="menu">

                <!-- Dashboard -->
                <li class="nav-item">
                    <a href="dashboard.php"
                       class="nav-link <?= $currentPage == 'dashboard.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-tachometer-alt"></i>
                        <p>Dashboard</p>
                    </a>
                </li>

                <!-- Bookings -->
                <li class="nav-item">
                    <a href="bookings.php"
                       class="nav-link <?= $currentPage == 'bookings.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-clipboard-list"></i>
                        <p>Bookings</p>
                    </a>
                </li>

                <!-- Customers -->
                <li class="nav-item">
                    <a href="customers.php"
                       class="nav-link <?= $currentPage == 'customers.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-users"></i>
                        <p>Customers</p>
                    </a>
                </li>

                <!-- Drivers -->
                <li class="nav-item">
                    <a href="drivers.php"
                       class="nav-link <?= $currentPage == 'drivers.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-car"></i>
                        <p>Drivers</p>
                    </a>
                </li>

                <!-- Fleet -->
                <li class="nav-item">
                    <a href="fleet.php"
                       class="nav-link <?= $currentPage == 'fleet.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-shuttle-van"></i>
                        <p>Fleet Management</p>
                    </a>
                </li>

                <!-- Configuration Section -->
                <li class="nav-header" style="color:#C9A24D;">CONFIGURATION</li>

                <!-- Services -->
                <li class="nav-item">
                    <a href="services.php"
                       class="nav-link <?= $currentPage == 'services.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-tags"></i>
                        <p>Services & Pricing</p>
                    </a>
                </li>

                <!-- Zones -->
                <li class="nav-item">
                    <a href="zones.php"
                       class="nav-link <?= $currentPage == 'zones.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-map-marked-alt"></i>
                        <p>Zone Management</p>
                    </a>
                </li>

                <!-- Driver Payouts -->
                <li class="nav-item">
                    <a href="payouts.php"
                       class="nav-link <?= $currentPage == 'payouts.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-wallet"></i>
                        <p>Driver Payouts</p>
                    </a>
                </li>

                <!-- Reports -->
                <li class="nav-item">
                    <a href="reports.php"
                       class="nav-link <?= $currentPage == 'reports.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-chart-line"></i>
                        <p>Reports</p>
                    </a>
                </li>

                <!-- System Section -->
                <li class="nav-header" style="color:#C9A24D;">SYSTEM</li>

                <li class="nav-item">
                    <a href="api-monitor.php"
                       class="nav-link <?= $currentPage == 'api-monitor.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-network-wired"></i>
                        <p>API Monitoring</p>
                    </a>
                </li>

                <li class="nav-item">
                    <a href="settings.php"
                       class="nav-link <?= $currentPage == 'settings.php' ? 'active' : '' ?>">
                        <i class="nav-icon fas fa-cogs"></i>
                        <p>System Settings</p>
                    </a>
                </li>

            </ul>
        </nav>
        <!-- /.sidebar-menu -->

    </div>
    <!-- /.sidebar -->

</aside>
