<aside class="main-sidebar">
    <section class="sidebar">
        <div class="user-panel">
            <div class="pull-left image">
			<img src="{{ !empty(Auth::guard('admin')->user()->image)?Auth::guard('admin')->user()->image_url: url('public/assets/admin/images/not-available.jpg') }}" class="img-circle" alt="User Image" style="width: 45px; height: 45px;">
            </div>
            <div class="pull-left info">
                <p style="text-transform: capitalize;">{{ Auth::guard('admin')->user()->name }}</p>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <ul class="sidebar-menu">
            <li class="header">MAIN NAVIGATION</li>

            <li class="{{ !empty($menu) && $menu=='home'?'active':'' }} "><a href="{{ url('admin/home') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>

            {{--@if(auth()->guard('admin')->user()->hasAnyPermission(['analytics']))
            <li class="{{ !empty($menu) && $menu=='analytics'?'active':'' }} "><a href="{{ url('admin/analytics') }}"><i class="fa fa-bar-chart"></i> Analytics</a></li>
            @endif--}}

            @if(auth()->guard('admin')->user()->hasAnyPermission(['category add','category edit','category delete']))
                <li class="{{ !empty($menu) && $menu=='category'?'active':'' }} "><a href="{{ url('admin/category') }}"><i class="fa fa-list"></i> Category</a></li>
            @endif 

            @php $currentUrl = url()->current(); @endphp
         
            <li class="{{ $currentUrl === url('admin/paper') ? 'active' : '' }}"><a href="{{ url('admin/paper') }}"><i class="fa fa-list"></i> Paper</a></li>
       

            {{--@if(auth()->guard('admin')->user()->hasAnyPermission(['subcategory']))
                <li class="{{ !empty($menu) && $menu=='subcategory'?'active':'' }} "><a href="{{ url('admin/subcategory') }}"><i class="fa fa-list"></i>Sub Category</a></li>
            @endif 
            <li class="{{ !empty($menu) && $menu=='product'?'active':'' }} "><a href="{{ url('admin/product') }}"><i class="fa fa-product-hunt"></i> Product</a></li>--}}
			
            
            {{-- <li class="treeview {{ !empty($menu) && $menu=='board' || $menu=='medium' || $menu=='standard' || $menu=='subject' || $menu=='chapter' || $menu=='paperstyle' || $menu=='state' || $menu=='city' || $menu=='querytype' || $menu=='reference' || $menu=='papertype'?'active':'' }}"> --}}
            <li class="treeview menu-open {{ !empty($menu) && $menu=='dropdown'?'active':'' }}">
               
            @if(auth()->guard('admin')->user()->hasAnyPermission(['board view','board add','board edit','board delete','medium view','medium add','medium edit','medium delete','standard view','standard add','standard edit','standard delete','subject view','subject add','subject edit','subject delete','chapter view','chapter add','chapter edit','chapter delete','paperstyle view','paperstyle add','paperstyle edit','paperstyle delete','state view','state add','state edit','state delete','city view','city add','city edit','city delete','reference view','reference add','reference edit','reference delete']))
                <a href="#">
                    <i class="fa fa-caret-square-o-down"></i>
                    <span>Drop Down</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
            @endif

              <ul class="treeview-menu">

                @if(auth()->guard('admin')->user()->hasAnyPermission(['board view','board add','board edit','board delete']))
			        <li class="{{ !empty($submenu) && $submenu=='board'?'active':'' }} "><a href="{{ url('admin/board') }}"><i class="fa fa-list"></i>Board</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['medium view','medium add','medium edit','medium delete']))
				    <li class="{{ !empty($submenu) && $submenu=='medium'?'active':'' }} "><a href="{{ url('admin/medium') }}"><i class="fa fa-list"></i>Medium</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['standard view','standard add','standard edit','standard delete']))
				    <li class="{{ !empty($submenu) && $submenu=='standard'?'active':'' }} "><a href="{{ url('admin/standard') }}"><i class="fa fa-list"></i>Standard</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['semester view','semester add','semester edit','semester delete']))
                <li class="{{ !empty($submenu) && $submenu=='semester'?'active':'' }} "><a href="{{ url('admin/semester') }}"><i class="fa fa-list"></i>Semester</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['subject view','subject add','subject edit','subject delete']))
                    <li class="{{ !empty($submenu) && $submenu=='subject'?'active':'' }} "><a href="{{ url('admin/subject') }}"><i class="fa fa-list"></i>Subject</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['chapter view','chapter add','chapter edit','chapter delete']))
				    <li class="{{ !empty($submenu) && $submenu=='chapter'?'active':'' }} "><a href="{{ url('admin/chapter') }}"><i class="fa fa-list"></i>Chapter</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['paperstyle view','paperstyle add','paperstyle edit','paperstyle delete']))
				    <li class="{{ !empty($submenu) && $submenu=='paperstyle'?'active':'' }} "><a href="{{ url('admin/paperstyle') }}"><i class="fa fa-list"></i>Question Label</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['questiontype view','questiontype add','questiontype edit','questiontype delete']))
                <li class="{{ !empty($submenu) && $submenu=='questiontype'?'active':'' }} "><a href="{{ url('admin/questiontype') }}"><i class="fa fa-list"></i>Question Type</a></li>
               @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['state view','state add','state edit','state delete']))
				    <li class="{{ !empty($submenu) && $submenu=='state'?'active':'' }} "><a href="{{ url('admin/state') }}"><i class="fa fa-list"></i>State</a></li>
                @endif

                @if(auth()->guard('admin')->user()->hasAnyPermission(['city view','city add','city edit','city delete']))
				    <li class="{{ !empty($submenu) && $submenu=='city'?'active':'' }} "><a href="{{ url('admin/city') }}"><i class="fa fa-list"></i>City</a></li>
                @endif
				{{-- <!--<li class="{{ !empty($submenu) && $submenu=='querytype'?'active':'' }} "><a href="{{ url('admin/querytype') }}"><i class="fa fa-list"></i>Query Type</a></li>
				<li class="{{ !empty($submenu) && $submenu=='papertype'?'active':'' }} "><a href="{{ url('admin/papertype') }}"><i class="fa fa-list"></i>Paper Type</a></li>--> --}}
                
                @if(auth()->guard('admin')->user()->hasAnyPermission(['reference view','reference add','reference edit','reference delete']))
                    <li class="{{ !empty($submenu) && $submenu=='reference'?'active':'' }} "><a href="{{ url('admin/reference') }}"><i class="fa fa-list"></i>Reference</a></li>
                @endif

			  </ul>
            </li>


            @if(auth()->guard('admin')->user()->hasAnyPermission(['question view','question add','question edit','question delete']))
			    <li class="{{ !empty($menu) && $menu=='question'?'active':'' }} "><a href="{{ url('admin/question') }}"><i class="fa fa-question"></i>Question</a></li>
            @endif

            @if(auth()->guard('admin')->user()->hasAnyPermission(['video view','video add','video edit','video delete']))
			    <li class="{{ !empty($menu) && $menu=='video'?'active':'' }} "><a href="{{ url('admin/video') }}"><i class="fa fa-list"></i> Video</a></li>
            @endif

            @if(auth()->guard('admin')->user()->hasAnyPermission(['contact view','contact delete']))
			    <li class="{{ !empty($menu) && $menu=='contact'?'active':'' }} "><a href="{{ url('admin/contact') }}"><i class="fa fa-list"></i> Contact</a></li>
            @endif

            @if(auth()->guard('admin')->user()->hasAnyPermission(['previouspaper view','previouspaper add','previouspaper edit','previouspaper delete']))
			    <li class="{{ !empty($menu) && $menu=='previouspaper'?'active':'' }} "><a href="{{ url('admin/previouspaper') }}"><i class="fa fa-list"></i> Previous Paper</a></li>
            @endif

            @if(auth()->guard('admin')->user()->hasAnyPermission(['user']))
                <li class="{{ !empty($menu) && $menu=='user'?'active':'' }} "><a href="{{ url('admin/user') }}"><i class="fa fa-user-circle-o"></i> User</a></li>
            @endif

            @if(auth()->guard('admin')->user()->hasAnyPermission(['sitesetting view','sitesetting edit']))
			    <li class="{{ !empty($menu) && $menu=='sitesetting'?'active':''}} "><a href="{{url('admin/sitesetting')}}"><i class="fa fa-gear"></i>Site Setting</a></li>
            @endif

            <li class="header">SETTING</li>




            @if(auth()->guard('admin')->user()->hasAnyPermission(['admin','role','permission']))
                <li class=" treeview menu-open {{ !empty($menu) && $menu=='admin'?'active':'' }}">
                    <a href="#">
                    <i class="fa fa-user-secret"></i> <span>Administrator</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        @if(auth()->guard('admin')->user()->hasAnyPermission(['admin']))
                            <li class="{{ !empty($submenu) && $submenu=='admin'?'active':'' }} "><a href="{{ url('admin/admin') }}"><i class="fa fa-user-secret"></i> Admin</a></li>
                        @endif 
                        @if(auth()->guard('admin')->user()->hasAnyPermission(['role']))
                            <li class="{{ !empty($submenu) && $submenu=='role'?'active':'' }} "><a href="{{ url('admin/role') }}"><i class="fa fa-users"></i> Role</a></li>
                        @endif 
                        @if(auth()->guard('admin')->user()->hasAnyPermission(['permission']))
                            <li class="{{ !empty($submenu) && $submenu=='permission'?'active':'' }} "><a href="{{ url('admin/permission') }}"><i class="fa fa-unlock-alt"></i> Permission</a></li>
                        @endif
                    </ul>
                </li>
            @endif





            <li class=" treeview menu-open {{ !empty($menu) && $menu=='profile'?'active':'' }}">
                <a href="#">
                  <i class="fa fa-dashboard"></i> <span>Profile/Password</span>
                  <span class="pull-right-container">
                    <i class="fa fa-angle-left pull-right"></i>
                  </span>
                </a>
                <ul class="treeview-menu">
                    <li class="{{ !empty($submenu) && $submenu=='profile'?'active':'' }} "><a href="{{ url('admin/profile') }}"><i class="fa fa-cogs"></i> Profile</a></li>
                    <li class="{{ !empty($submenu) && $submenu=='reset_password'?'active':'' }} "><a href="{{ url('admin/reset_password') }}"><i class="fa fa-key"></i> Reset Password</a></li>
                </ul>
            </li>
            <li class="bg-green-active"><a href="{{ url('admin/logout') }}" class="" ><i class="fa fa-sign-out" style="color: rgb(255, 255, 255);"></i><span style="color: rgb(255, 255, 255);">Logout</span></a></li>
           {{--<li class=""><a href="{{ url('admin/logout') }}"><i class="fa fa-sign-out"></i> Logout</a></li>--}}
        </ul>
    </section>
</aside>