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

<div id="sidebar-wrapper">
    <div class="sidebar-heading">
        <i class="bi bi-wallet2 fs-4 mb-1 d-block"></i>
        <h6 class="mb-0 fw-bold">E-TABUNGAN</h6>
        <small class="text-warning" style="font-size: 0.7rem;">
            TA: <?= htmlspecialchars($tahun_aktif_display) ?>
        </small>
    </div>
    
    <div class="list-group list-group-flush custom-sidebar-nav">
        <a href="dashboard.php" class="list-group-item <?= ($current_page == 'dashboard.php') ? 'active' : ''; ?>">
            <i class="bi bi-grid-1x2-fill me-2"></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-door-open-fill me-2"></i> Data Kelas
        </a>
        <a href="siswa.php" class="list-group-item <?= ($current_page == 'siswa.php') ? 'active' : ''; ?>">
            <i class="bi bi-people-fill me-2"></i> Data Nasabah
        </a>
        <a href="data_pembayaran.php" class="list-group-item <?= ($current_page == 'data_pembayaran.php') ? 'active' : ''; ?>">
            <i class="bi bi-tags-fill me-2"></i> Jenis 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-plus-circle-fill text-success me-2"></i> Setoran Tunai
        </a>
        <a href="penarikan.php" class="list-group-item <?= ($current_page == 'penarikan.php') ? 'active' : ''; ?>">
            <i class="bi bi-dash-circle-fill text-danger me-2"></i> Penarikan Tunai
        </a>
        <a href="transfer.php" class="list-group-item <?= ($current_page == 'transfer.php') ? 'active' : ''; ?>">
            <i class="bi bi-arrow-left-right text-primary me-2"></i> Transfer Saldo
        </a>
        <a href="pembayaran.php" class="list-group-item <?= ($current_page == 'pembayaran.php') ? 'active' : ''; ?>">
            <i class="bi bi-receipt text-warning me-2"></i> Pembayaran Iuran
        </a>
        
        <div class="menu-section-title">SISTEM</div>
        <a href="laporan.php" class="list-group-item <?= ($current_page == 'laporan.php') ? 'active' : ''; ?>">
            <i class="bi bi-file-earmark-pdf-fill me-2"></i> Laporan
        </a>
        <a href="pengaturan.php" class="list-group-item <?= ($current_page == 'pengaturan.php') ? 'active' : ''; ?>">
            <i class="bi bi-sliders me-2"></i> Pengaturan
        </a>
        <a href="pengguna.php" class="list-group-item <?= ($current_page == 'pengguna.php') ? 'active' : ''; ?>">
            <i class="bi bi-person-badge-fill me-2"></i> Hak Akses
        </a>
        
        <div class="mt-3 px-3">
            <a href="../logout.php" class="btn btn-sm btn-outline-danger w-100 py-1" style="font-size: 0.75rem;">
                <i class="bi bi-box-arrow-left me-1"></i> Keluar
            </a>
        </div>
    </div>
</div>