<?php
$currentPage = basename($_SERVER['PHP_SELF']);
?>
<aside class="sidebar" id="appSidebar">
  <div class="sidebar-brand">
    <div class="brand-icon"><i class="fas fa-graduation-cap"></i></div>
    <div class="brand-text">
      <h2>Program Indonesia Pintar</h2>
      <p>Sistem Klasifikasi Kelayakan</p>
    </div>
    <button type="button" class="sidebar-toggle" id="sidebarToggle" aria-label="Toggle Sidebar">
      <i class="fas fa-columns"></i>
    </button>
  </div>
  <nav class="sidebar-nav">
    <a href="dashboard.php" class="nav-item <?= $currentPage === 'dashboard.php' ? 'active' : '' ?>">
      <i class="fas fa-th-large"></i><span>Dashboard</span>
    </a>
    <a href="users.php" class="nav-item <?= $currentPage === 'users.php' ? 'active' : '' ?>">
      <i class="fas fa-users"></i><span>Data Admin</span>
    </a>
    <a href="siswa.php" class="nav-item <?= in_array($currentPage, ['siswa.php', 'siswa_tambah.php', 'siswa_edit.php']) ? 'active' : '' ?>">
      <i class="fas fa-user-graduate"></i><span>Data Siswa</span>
    </a>
    <a href="klasifikasi.php" class="nav-item <?= $currentPage === 'klasifikasi.php' ? 'active' : '' ?>">
      <i class="fas fa-calculator"></i><span>Klasifikasi</span>
    </a>
    <a href="laporan.php" class="nav-item <?= $currentPage === 'laporan.php' ? 'active' : '' ?>">
      <i class="fas fa-file-alt"></i><span>Laporan</span>
    </a>
  </nav>
  <div class="sidebar-footer">
    <a href="logout.php" class="nav-item logout">
      <i class="fas fa-sign-out-alt"></i><span>Logout</span>
    </a>
  </div>
</aside>
