@php
    $roleId = session('role_id');
@endphp

<!-- ======= Sidebar ======= -->
<aside id="sidebar" class="sidebar">
    <ul class="sidebar-nav" id="sidebar-nav">
        {{-- Untuk Admin --}}
        @if($roleId != 2)
            <li class="nav-item">
                <a class="nav-link collapsed"  class="{{ request()->routeIs('dashboard') ? 'active' : '' }}" href="{{ route('dashboard') }}" >
                    <i class="bi-bar-chart"></i>
                    <span>Dashboard</span>
                </a>
            </li>

            <li class="nav-item">
                <a class="nav-link" data-bs-target="#components-nav" data-bs-toggle="collapse" href="#">
                    <i class="bi bi-menu-button-wide"></i><span>Data Alumni</span><i class="bi bi-chevron-down ms-auto"></i>
                </a>
                <ul id="components-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
                    <li><a class="{{ request()->routeIs('data_alumni.index') ? 'active' : '' }}" href="{{ route('data_alumni.index') }}"><i class="bi bi-circle"></i><span>Data Alumni</span></a></li>
                    <li><a class="{{ request()->routeIs('jabatan.index') ? 'active' : '' }}" href="{{ route('jabatan.index') }}"><i class="bi bi-circle"></i><span>Kelompok Jabatan</span></a></li>
                    <li><a class="{{ request()->routeIs('kualifikasi.index') ? 'active' : '' }}" href="{{ route('kualifikasi.index') }}"><i class="bi bi-circle"></i><span>Kualifikasi bidang</span></a></li>
                    <li><a class="{{ request()->routeIs('tahun_angkatan.index') ? 'active' : '' }}" href="{{ route('tahun_angkatan.index') }}"><i class="bi bi-circle"></i><span>Tahun Angkatan</span></a></li>
                </ul>
            </li>

            <li class="nav-item">
                <a class="nav-link collapsed" data-bs-target="#forms-nav" data-bs-toggle="collapse" href="#">
                    <i class="bi-calculator"></i><span>Perhitungan</span><i class="bi bi-chevron-down ms-auto"></i>
                </a>
                <ul id="forms-nav" class="nav-content collapse" data-bs-parent="#sidebar-nav">
                    <li>
                        <a class="{{ request()->routeIs('proses_klasifikasi') ? 'active' : '' }}" href="{{ route('proses_klasifikasi') }}" class="nav-link">
                        <i class="bi bi-circle"></i><span>Proses</span>
                        </a>
                    </li>
                    <li>
                        <a class="{{ request()->routeIs('hasil_klasifikasi.index') ? 'active' : '' }}" 
                        href="{{ route('hasil_klasifikasi.index') }}" class="nav-link">
                        <i class="bi bi-circle"></i><span>Hasil Klasifikasi</span>
                        </a>
                    </li>
                </ul>
            </li>

            <li class="nav-item">
                <a class="nav-link collapsed" href="{{ route('export.kmeans.index') }}" class="nav-link">
                    <i class="bi bi-file-earmark"></i>
                    <span>Export</span>
                </a>
            </li>
            
            <li class="nav-item">
                <a class="nav-link" data-bs-target="#tables-nav" data-bs-toggle="collapse" href="#">
                    <i class="bi bi-layout-text-window-reverse"></i><span>Pengguna</span><i class="bi bi-chevron-down ms-auto"></i>
                </a>
                <ul id="tables-nav" class="nav-content collapse show" data-bs-parent="#sidebar-nav">
                    <li><a class="{{ request()->routeIs('user') ? 'active' : '' }}" href="{{ route('user') }}">
                        <i class="bi bi-circle"></i>
                        <span>Users</span>
                        </a>
                    </li>
                </ul>
            </li>

            
           
        @endif

        {{-- Untuk Mahasiswa (id_role = 2) --}}
        @if($roleId == 2)
            <li class="nav-item">
                <a class="nav-link" href="{{ route('formalumni') }}">
                    <i class="bi bi-person"></i><span>Form Alumni</span>
                </a>
            </li>
        @endif

    </ul>
</aside>
