@if(Auth::check())
<div class="sidebar" data-background-color="white" data-active-color="danger">
    <div class="sidebar-wrapper">

            @if(Auth::user()->role == 'tatausaha')
            <div class="logo">
                <a href="{{route('tatausaha')}}" class="simple-text">
                    <i class="glyphicon glyphicon-home"></i>
                    Selamat Datang {{Auth::user()->username}}
                </a>
            </div>

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('tatausaha')}}">
                    <i class="glyphicon glyphicon-th-list"></i>
                    <p>Dashboard</p>
                </a>
            </li>

            <li class="{{Request::segment(2) == 'upload' ? 'active' : ''}}">
                <a href="{{route('upload.index')}}">
                    <i class="glyphicon glyphicon-list-alt"></i>
                    <p>Pengumuman</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'Daftar' ? 'active' : ''}}">
                <a href="{{route('Daftar.index')}}">
                    <i class="glyphicon glyphicon-user"></i>
                    <p>Pendaftar</p>

                </a>
            </li>
            <li class="{{Request::segment(2) == 'tahunajaran' ? 'active' : ''}}">
                <a href="{{route('tahunajaran.index')}}">
                    <i class="glyphicon glyphicon-book"></i>
                    <p>Tahun Ajaran</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'ruang' ? 'active' : ''}}">
                <a href="{{route('ruang.index')}}">
                    <i class="glyphicon glyphicon-book"></i>
                    <p>Ruang Ujian</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'akunsiswa' ? 'active' : ''}}">
                <a href="{{route('akunsiswa.index')}}">
                    <i class="glyphicon glyphicon-book"></i>
                    <p>Account Calon Siswa</p>
                </a>
            </li>
            

            @elseif(Auth::user()->role == 'calonsiswa')
            <div class="logo">
                <a href="http://www.creative-tim.com" class="simple-text">
                    <i class="glyphicon glyphicon-home"></i>
                    Selamat Datang {{Auth::user()->username}}
                </a>
            </div>
            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('calonsiswa')}}">
                    <i class="glyphicon glyphicon-th-list"></i>
                    <p>Dashboard</p>
                </a>
            </li>
            
            <li class="{{Request::segment(1) == '' ? 'active' : ''}}">
                <a href="url(/Dashboard)" class="dropdown-toggle" data-toggle="dropdown">
                <i class="glyphicon glyphicon-pencil"></i>
                <p>Daftar Online</p></a>
                    <ul class="dropdown-menu">
                        <li class="{{Request::segment(2) == 'pendaftar' ? 'active' : ''}}"><a href="{{route('pendaftar.create')}}">Data Wajib</a></li>
                        <li class="{{Request::segment(2) == 'orangtua' ? 'active' : ''}}"><a href="{{route('orangtua.create')}}">Data Orang Tua</a></li>
                        <li class="{{Request::segment(2) == 'prestasi' ? 'active' : ''}}"><a href="{{route('prestasi.create')}}">Data Prestasi</a></li>
                    </ul>
            </li>
            <li class="{{Request::segment(2) == 'downloadpeng' ? 'active' : ''}}">
                <a href="{{route('downloadpeng.index')}}">
                    <i class="glyphicon glyphicon-list-alt"></i>
                    <p>Pengumuman</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'downloadsoal' ? 'active' : ''}}">
                <a href="{{route('downloadsoal.index')}}">
                    <i class="glyphicon glyphicon-download-alt"></i>
                    <p>Download Contoh Soal</p>
                </a>
            </li>

            <li class="{{Request::segment(2) == 'pdf' ? 'active' : ''}}">
                <a href="{{route('pdf.index')}}">
                    <i class="glyphicon glyphicon-credit-card"></i>
                    <p>Kartu Ujian</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'hasilujian' ? 'active' : ''}}">
                <a href="{{route('hasilujian.index')}}">
                    <i class="glyphicon glyphicon-book"></i>
                    <p>Hasil Ujian</p>
                </a>
            </li>
            
            @else
            <div class="logo">
                <a href="http://www.creative-tim.com" class="simple-text">
                    Selamat Datang {{Auth::user()->username}}
                </a>
            </div>

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('kepalasekolah')}}">
                    <i class="ti-panel"></i>
                    <p>Dashboard</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'daftarpen' ? 'active' : ''}}">
                <a href="{{route('daftarpen.index')}}">
                    <i class="ti-panel"></i>
                    <p>Pendaftar</p>
                </a>
            </li>
            
            @endif
        </ul>
    </div>
</div>
@endif