<?php require_once __DIR__ . '/../config/database.php'; ?>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
    <div class="container">
        <a class="navbar-brand d-flex align-items-center fs-4 fw-bold" href="<?= BASE_URL ?>dashboard.php">
        <i class="bi bi-journal-bookmark-fill me-2 text-light"></i> Buku Induk Sekolah
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav me-auto">
                <li class="nav-item">
               <li class="nav-item">
                <a class="nav-link d-flex align-items-center" href="<?= BASE_URL ?>dashboard.php">
                    <i class="bi bi-house-door-fill me-2 text-warning"></i>
                    <span class="text-light"> Beranda</span>
                </a>
                </li>
                 <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle d-flex align-items-center fs-6 fw-semibold" 
                    href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                    <i class="bi bi-gear-fill me-2 text-warning"></i> 
                    <span class="text-light">Setting</span>
                    </a>
                    <ul class="dropdown-menu shadow rounded-3">
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>tahunajaran/index.php">
                        <i class="bi bi-calendar3 me-2"></i> Tahun Ajaran
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>tahunajaran/semester.php">
                        <i class="bi bi-journal-text me-2"></i> Semester
                        </a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>matapelajaran/index.php">
                        <i class="bi bi-journal-bookmark-fill me-2"></i> Pelajaran
                        </a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>keloladata/kelola-tahun-ajaran.php">
                        <i class="bi-collection-fill me-2"></i> Kelola Data
                        </a></li>
                    </ul>
                </li>
                <li class="nav-item">
                    <a class="nav-link d-flex align-items-center" href="<?= BASE_URL ?>guru/index.php">
                        <i class="bi bi-person-badge-fill me-2 text-warning"></i> 
                        <span class="text-light">Guru dan TAS</span>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle d-flex align-items-center fs-6 fw-semibold" 
                    href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                    <i class="bi bi-people-fill me-2 text-warning"></i> 
                    <span class="text-light">Data Siswa</span>
                    </a>
                    <ul class="dropdown-menu shadow rounded-3">
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>siswa/index.php">
                        <i class="bi bi-people me-2"></i> Daftar Siswa
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>klapper/index.php">
                        <i class="bi bi-person-plus me-2"></i> Klapper
                        </a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>pendidikan/">
                        <i class="bi bi-book me-2"></i> Pendidikan
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>orangtua/">
                        <i class="bi bi-people-fill me-2"></i> Orang Tua
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>kegemaran/">
                        <i class="bi bi-heart me-2"></i> Kegemaran
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>prestasi/">
                        <i class="bi bi-trophy me-2"></i> Prestasi
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>beasiswa/">
                        <i class="bi bi-award me-2"></i> Beasiswa
                        </a></li>
                        <li><a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>perkembangan/">
                        <i class="bi bi-graph-up-arrow me-2"></i> Perkembangan
                        </a></li>
                    </ul>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle d-flex align-items-center fs-6 fw-semibold" 
                    href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                        <i class="bi bi-journal-check me-2 text-warning"></i>
                        <span class="text-light">Nilai</span>
                    </a>
                    <ul class="dropdown-menu shadow rounded-3">
                        <li>
                            <a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>nilai/">
                                <i class="bi bi-journal-text me-2 text-primary"></i> Nilai Rapor
                            </a>
                        </li>
                        <li>
                            <a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>development.php">
                                <i class="bi bi-trophy me-2 text-success"></i> Nilai Ekstrakurikuler
                            </a>
                        </li>
                        <li><hr class="dropdown-divider"></li>
                        <li>
                            <a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>development.php">
                                <i class="bi bi-calendar-check me-2 text-info"></i> Rekap Absensi
                            </a>
                        </li>
                        <li><hr class="dropdown-divider"></li>
                        <li>
                            <a class="dropdown-item d-flex align-items-center" href="<?= BASE_URL ?>development.php">
                                <i class="bi bi-pencil-square me-2 text-danger"></i> Nilai Ujian
                            </a>
                        </li>
                    </ul>
                </li>

            </ul>
        <ul class="navbar-nav">
            <?php if (isset($_SESSION['login'])): ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?= BASE_URL ?>logout.php">
                        <i class="bi bi-box-arrow-right me-1" style="color: gold;"></i> Logout
                    </a>
                </li>
            <?php else: ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?= BASE_URL ?>login.php">
                        <i class="bi bi-box-arrow-in-right me-1" style="color: gold;"></i> Login
                    </a>
                </li>
            <?php endif; ?>
        </ul>

        </div>
    </div>
</nav>