<?php
// admin/sidebar.php
$current_page = basename($_SERVER['PHP_SELF']);
?>

<div id="sidebar-wrapper">
    <div class="sidebar-heading">
        <i class="bi bi-wallet2 fs-3 mb-2 d-block"></i>
        <h5>E-Tabungan</h5>
        <small class="text-warning fw-bold">
            Tahun Fiskal: <?= htmlspecialchars($tahun_aktif_display) ?>
        </small>
    </div>
    
    <div class="list-group list-group-flush">
        <a href="dashboard.php" class="list-group-item <?= ($current_page == 'dashboard.php') ? 'active' : ''; ?>">
            <i class="bi bi-speedometer2"></i> Dashboard
        </a>
        
        <div class="menu-section-title">Manajemen Data</div>
        <a href="kelas.php" class="list-group-item <?= ($current_page == 'kelas.php') ? 'active' : ''; ?>">
            <i class="bi bi-easel-fill"></i> Data Kelas
        </a>
        <a href="siswa.php" class="list-group-item <?= ($current_page == 'siswa.php') ? 'active' : ''; ?>">
            <i class="bi bi-people-fill"></i> Data Nasabah/Siswa
        </a>
        
        <a href="data_pembayaran.php" class="list-group-item <?= ($current_page == 'data_pembayaran.php') ? 'active' : ''; ?>">
            <i class="bi bi-easel-fill"></i> Data Pembayaran
        </a>

        <div class="menu-section-title">Transaksi</div>
        <a href="setoran.php" class="list-group-item <?= ($current_page == 'setoran.php') ? 'active' : ''; ?>">
            <i class="bi bi-arrow-down-circle-fill text-success"></i> Setoran Tunai
        </a>
        <a href="penarikan.php" class="list-group-item <?= ($current_page == 'penarikan.php') ? 'active' : ''; ?>">
            <i class="bi bi-arrow-up-circle-fill text-danger"></i> Penarikan Tunai
        </a>
        <a href="transfer.php" class="list-group-item <?= ($current_page == 'transfer.php') ? 'active' : ''; ?>">
            <i class="bi bi-arrow-up-circle-fill text-danger"></i> Transfer
        </a>
        <a href="pembayaran.php" class="list-group-item <?= ($current_page == 'pembayaran.php') ? 'active' : ''; ?>">
            <i class="bi bi-arrow-up-circle-fill text-danger"></i> Pembayaran
        </a>
        
        <div class="menu-section-title">Laporan & Sistem</div>
        <a href="laporan.php" class="list-group-item <?= ($current_page == 'laporan.php') ? 'active' : ''; ?>">
            <i class="bi bi-file-earmark-bar-graph"></i> Laporan Keuangan
        </a>
        <a href="pengaturan.php" class="list-group-item <?= ($current_page == 'pengaturan.php') ? 'active' : ''; ?>">
            <i class="bi bi-gear"></i> Pengaturan
        </a>
        <a href="pengguna.php" class="list-group-item <?= ($current_page == 'pengguna.php') ? 'active' : ''; ?>">
            <i class="bi bi-gear"></i> Pengguna
        </a>
        <a href="../logout.php" class="list-group-item text-danger">
            <i class="bi bi-box-arrow-left"></i> Logout
        </a>
    </div>
</div>