<div class="sidebar sidebar-light sidebar-main sidebar-expand-md">

    <!-- Sidebar mobile toggler -->
    <div class="sidebar-mobile-toggler text-center">
        <a href="#" class="sidebar-mobile-main-toggle">
            <i class="icon-arrow-left8"></i>
        </a>
        <span class="font-weight-semibold">Navigation</span>
        <a href="#" class="sidebar-mobile-expand">
            <i class="icon-screen-full"></i>
            <i class="icon-screen-normal"></i>
        </a>
    </div>
    <!-- /sidebar mobile toggler -->


    <!-- Sidebar content -->
    <div class="sidebar-content">

        <!-- User menu -->
        <div class="sidebar-user-material">
            <div class="sidebar-user-material-body" style="background: #333333">
                <div class="card-body text-center">
                    <!-- <a href="#">
                        <img src="{{ asset('/assets/global/images/placeholders/placeholder.jpg')}}" class="img-fluid rounded-circle shadow-1 mb-3" width="80" height="80" alt="">
                    </a> -->
                    <h6 class="mb-0 text-white text-shadow-dark">{{Auth::user()->name}}</h6>
                    <span class="font-size-sm text-white text-shadow-dark">{{Auth::user()->email}}</span>
                </div>
                                            
                <div class="sidebar-user-material-footer">
                    <a href="#user-nav" class="d-flex justify-content-between align-items-center text-shadow-dark dropdown-toggle" data-toggle="collapse"><span>My account</span></a>
                </div>
            </div>

            <div class="collapse @if(Request::segment(2) == 'profile'){{'show'}}@endif" id="user-nav">
                <ul class="nav nav-sidebar">
                    <li class="nav-item">
                        <a href="{{ url('admin/profile/change') }}" class="nav-link @if(Request::segment(2) == 'profile'){{'active'}}@endif">
                            <i class="icon-user-plus"></i>
                            <span>My profile</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{{ url('/admin/logout') }}" class="nav-link" onclick="event.preventDefault();
                                     document.getElementById('logout-form').submit();">
                            <i class="icon-switch2"></i>
                            <span>Logout</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- /user menu -->


        <!-- Main navigation -->
        <div class="card card-sidebar-mobile">
            <ul class="nav nav-sidebar" data-nav-type="accordion">

                <!-- Main -->
                {{-- <li class="nav-item-header"><div class="text-uppercase font-size-xs line-height-xs">Main</div> <i class="icon-menu" title="Main"></i></li> --}}
                <li class="nav-item">
                    <a href="{{url('/admin/dashboard')}}" class="nav-link @if(Request::segment(2) == 'dashboard'){{'active'}}@endif">
                        <i class="icon-home4"></i>
                        <span>
                            Dashboard
                        </span>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{url('/admin/findCourse')}}" class="nav-link @if(Request::segment(2) == 'findCourse'){{'active'}}@endif">
                        <i class="icon-folder-search"></i>
                        <span>
                            Find Course
                        </span>
                    </a>
                </li>
                <li class="nav-item nav-item-submenu @if(in_array(Request::segment(2), ['destinations','institutes','campuses','levels','courses'])){{'nav-item-open'}}@endif">
                    <a href="#" class="nav-link"><i class="icon-cogs"></i> <span>Config Data</span></a>

                    <ul class="nav nav-group-sub" data-submenu-title="Layouts" @if(in_array(Request::segment(2), ['destinations','institutes','campuses','levels','courses'])) style="display: block;" @endif >
                        <li class="nav-item">
                            <a href="{{ url('admin/destinations') }}" class="nav-link @if(Request::segment(2) == 'destinations'){{'active'}}@endif">Destinations</a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ url('admin/institutes') }}" class="nav-link @if(Request::segment(2) == 'institutes'){{'active'}}@endif">Institutes</a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ url('admin/campuses') }}" class="nav-link @if(Request::segment(2) == 'campuses'){{'active'}}@endif">Campuses</a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ url('admin/levels') }}" class="nav-link @if(Request::segment(2) == 'levels'){{'active'}}@endif">Levels</a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ url('admin/courses') }}" class="nav-link @if(Request::segment(2) == 'courses'){{'active'}}@endif">Courses</a>
                        </li>
                    </ul>
                </li>
                @if(Auth::user()->can('role_&_permission'))
                <li class="nav-item nav-item-submenu @if(in_array(Request::segment(2), ['permissions','roles'])){{'nav-item-open'}}@endif">
                    <a href="#" class="nav-link"><i class="icon-key"></i> <span>Role & Permission</span></a>

                    <ul class="nav nav-group-sub" data-submenu-title="Layouts" @if(in_array(Request::segment(2), ['permissions','roles'])) style="display: block;" @endif >
                        <li class="nav-item">
                            <a href="{{ url('admin/permissions') }}" class="nav-link @if(Request::segment(2) == 'permissions'){{'active'}}@endif">Permissions</a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ url('admin/roles') }}" class="nav-link @if(Request::segment(2) == 'roles'){{'active'}}@endif">Roles</a>
                        </li>
                    </ul>
                </li>
                @endif
                @if(Auth::user()->can('admins'))
                <li class="nav-item">
                    <a href="{{url('/admin/admins')}}" class="nav-link @if(Request::segment(2) == 'admins'){{'active'}}@endif">
                        <i class="icon-users"></i>
                        <span>
                            Admins
                        </span>
                    </a>
                </li>
                @endif
            </ul>
        </div>
        <!-- /main navigation -->

    </div>
    <!-- /sidebar content -->
    
</div>