<?php
// Get the current page's filename to determine which menu item should be 'active'.
// For example, if the URL is "yoursite.com/admin/users.php", basename() will return "users.php".
$currentPage = basename($_SERVER['PHP_SELF']);
?>

<div class="sidebar">

    <div class="sidebar-header">
        সহজ রিচার্জ
    </div>

    <a href="index.php" class="nav-link <?php echo ($currentPage == 'index.php') ? 'active' : ''; ?>">
        <i class="fas fa-tachometer-alt nav-icon"></i> ড্যাশবোর্ড
    </a>
    
    <a href="balance_requests.php" class="nav-link <?php echo ($currentPage == 'balance_requests.php') ? 'active' : ''; ?>">
        <i class="fas fa-wallet nav-icon"></i> ব্যালেন্স রিকুয়েস্ট
    </a>
    
    <a href="users.php" class="nav-link <?php echo in_array($currentPage, ['users.php', 'edit_user.php']) ? 'active' : ''; ?>">
        <i class="fas fa-users nav-icon"></i> ইউজার ম্যানেজমেন্ট
    </a>
    
    <a href="api_gateways.php" class="nav-link"><i class="nav-icon fas fa-cogs"></i> API গেটওয়ে</a>
   
   
    <a href="offers.php" class="nav-link <?php echo in_array($currentPage, ['offers.php', 'add_edit_offer.php']) ? 'active' : ''; ?>">
        <i class="fas fa-tags nav-icon"></i> অফার ম্যানেজমেন্ট
    </a>
    
    <a href="package_orders.php" class="nav-link"><i class="nav-icon fas fa-shopping-cart"></i> প্যাকেজ অর্ডার</a>
  
  
    <a href="offer_commissions.php" class="nav-link <?php echo ($currentPage == 'offer_commissions.php') ? 'active' : ''; ?>">
        <i class="fas fa-percent nav-icon"></i> অফার কমিশন
    </a>
    
    <a href="transactions.php" class="nav-link <?php echo ($currentPage == 'transactions.php') ? 'active' : ''; ?>">
        <i class="fas fa-history nav-icon"></i> সকল লেনদেন
    </a>
    
    <a href="send_notice.php" class="nav-link"><i class="nav-icon fas fa-paper-plane"></i> নোটিশ পাঠান</a>
    
    <a href="activity_log.php" class="nav-link <?php echo ($currentPage == 'activity_log.php') ? 'active' : ''; ?>">
        <i class="fas fa-clipboard-list nav-icon"></i> অ্যাক্টিভিটি লগ
    </a>
    
    <a href="payment_methods.php" class="nav-link"><i class="nav-icon fas fa-credit-card"></i> পেমেন্ট মেথড</a>
    <a href="sliders.php" class="nav-link"><i class="nav-icon fas fa-images"></i> স্লাইডার ম্যানেজমেন্ট</a>
  
  
    <a href="helpline_settings.php" class="nav-link"><i class="nav-icon fas fa-headset"></i> হেল্পলাইন সেটিংস</a>
    <a href="website_settings.php" class="nav-link"><i class="nav-icon fas fa-globe"></i> ওয়েবসাইট সেটিংস</a>
    
    <a href="logout.php" class="nav-link mt-auto">
        <i class="fas fa-sign-out-alt nav-icon"></i> লগআউট
    </a>

</div>