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

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

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('admin')}}">
                    <i class="fa fa-home"></i>
                    <p>Dashboard</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'book' ? 'active' : ''}}">
                <a href="{{route('book.index')}}">
                    <i class="fa fa-bed "></i>
                    <p>List of Book</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'upload' ? 'active' : ''}}">
                <a href="{{route('upload.index')}}">
                    <i class="fa fa-clipboard"></i>
                    <p>Share</p>
                </a>
            </li>




            <li class="{{Request::segment(2) == 'mahasiswa' ? 'active' : ''}}">
                <a href="{{route('mahasiswa.index')}}">
                    <i class="fa fa-drivers-license-o"></i>
                    <p>Tambahkan Mahasiswa</p>
                </a>
            </li>

            <li class="{{Request::segment(2) == 'manager' ? 'active' : ''}}">
                <a href="{{route('manager.index')}}">
                    <i class="fa fa-drivers-license-o"></i>
                    <p>Tambahkan Manager</p>
                </a>
            </li>

            @elseif(Auth::user()->role == 'mahasiswa')
            <div class="logo">
                <a href="{{route('mahasiswa')}}" class="simple-text">
                    Selamat Datang {{Auth::user()->mahasiswa->nama_mahasiswa}}
                </a>
            </div>

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('mahasiswa')}}">
                    <i class="fa fa-home"></i>
                    <p>Dashboard</p>
                </a>
            </li>

             <li class="{{Request::segment(2) == 'sbook' ? 'active' : ''}}">
                <a href="{{route('sbook.index')}}">
                    <i class="fa fa-book "></i>
                    <p>List of Book</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'seeupload' ? 'active' : ''}}">
                <a href="{{route('seeupload.index')}}">
                    <i class="fa fa-list"></i>
                    <p>List of Ide</p>
                </a>
            </li>

           @elseif(Auth::user()->role == 'manager')
            <div class="logo">
                <a href="{{route('manager')}}" class="simple-text">
                    Selamat Datang {{Auth::user()->manager->nama_manager}}
                </a>
            </div>

            <ul class="nav">
            <li class="{{Request::segment(2) == '' ? 'active' : ''}}">
                <a href="{{route('manager')}}">
                    <i class="fa fa-home"></i>
                    <p>Dashboard</p>
                </a>
            </li>

             <li class="{{Request::segment(2) == 'sbook' ? 'active' : ''}}">
                <a href="{{route('sbook.index')}}">
                    <i class="fa fa-book "></i>
                    <p>List of Book</p>
                </a>
            </li>
            <li class="{{Request::segment(2) == 'seeupload' ? 'active' : ''}}">
                <a href="{{route('seeupload.index')}}">
                    <i class="fa fa-list"></i>
                    <p>List of Ide</p>
                </a>
            </li>




            @else(Auth::user()->role == 'dosen')



            
            
            @endif
        </ul>
    </div>
</div>
@endif