<?php
$current = basename($_SERVER['PHP_SELF']);
function c_active($file, $current) {
    return $current === $file ? 'active' : '';
}
?>
<aside class="cashier-sidebar" id="cashierSidebar">
  <div class="cashier-brand">
    <div class="cashier-logo">GO</div>
    <span>Cashier</span>
  </div>

  <nav class="cashier-nav">
    <a href="cashier_dashboard.php" class="<?= c_active('cashier_dashboard.php', $current); ?>">
        <span class="icon">🏠</span><span class="label">Dashboard</span>
    </a>

    <!-- Open Cash Session -->
    <a href="open_cash_session.php" class="<?= c_active('open_cash_session.php', $current); ?>">
        <span class="icon">💼</span><span class="label">Open Cash Session</span>
    </a>

    <!-- Close Cash Session -->
    <a href="close_cash_session.php" class="<?= c_active('close_cash_session.php', $current); ?>">
        <span class="icon">🔒</span><span class="label">Close Cash Session</span>
    </a>

    <!-- All products -->
    <a href="cashier_products.php" class="<?= c_active('cashier_products.php', $current); ?>">
        <span class="icon">📦</span><span class="label">View Products</span>
    </a>

    <!-- Low stock (below 10) -->
    <a href="cashier_low_stock.php" class="<?= c_active('cashier_low_stock.php', $current); ?>">
        <span class="icon">⚠️</span><span class="label">Low Stock</span>
    </a>

    <a href="scan_sales.php" class="<?= c_active('scan_sales.php', $current); ?>">
        <span class="icon">📷</span><span class="label">Scan Product</span>
    </a>

    <a href="record_sales.php" class="<?= c_active('record_sales.php', $current); ?>">
        <span class="icon">🛒</span><span class="label">Record Sales</span>
    </a>

    <a href="today_transaction_history.php" class="<?= c_active('today_transaction_history.php', $current); ?>">
        <span class="icon">📄</span><span class="label">View Today's Sales Transactions</span>
    </a>

    <a href="transaction_history.php" class="<?= c_active('transaction_history.php', $current); ?>">
        <span class="icon">📄</span><span class="label">View All Sales Transactions</span>
    </a>

    <!-- Payments page link -->
    <a href="cashier_payments.php" class="<?= c_active('cashier_payments.php', $current); ?>">
        <span class="icon">🧾</span><span class="label">Payments</span>
    </a>

    <!-- ✅ New: Credit Payments page link -->
    <a href="cashier_credit_payments.php" class="<?= c_active('cashier_credit_payments.php', $current); ?>">
        <span class="icon">📑</span><span class="label">Credit Payments</span>
    </a>

    <a href="cashier_customer_details.php" class="<?= c_active('cashier_customer_details.php', $current); ?>">
        <span class="icon">👥</span><span class="label">Customers Transaction History</span>
    </a>

    <a href="add_expense.php" class="<?= c_active('add_expense.php', $current); ?>">
        <span class="icon">💰</span><span class="label">Expenses</span>
    </a>

    <a href="customer_debts.php" class="<?= c_active('customer_debts.php', $current); ?>">
        <span class="icon">💳</span><span class="label">Credit Sales</span>
    </a>

    <a href="add_damages.php" class="<?= c_active('add_damages.php', $current); ?>">
        <span class="icon">⚠️</span><span class="label">Damaged Products</span>
    </a>

    <a href="logout.php">
        <span class="icon">🚪</span><span class="label">Logout</span>
    </a>
  </nav>
</aside>
