<aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="/" class="brand-link">
        <img src="{{ url('public/assets/dist/img/rama-logo.jpeg') }}" alt="Logo" class="brand-image img-circle elevation-3"
            style="opacity: .8">
        <span class="brand-text font-weight-light">Claim & Case Management</span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
        <!-- Sidebar user panel (optional) -->
        <div class="user-panel mt-3 pb-3 mb-3 d-flex">
            <div class="image">
                @if(!empty(Auth::user()->user_profile))
                @php
                $user_profile = Auth::user()->user_profile;
                $profile_url = asset('public/assets/users/profiles').'/'.$user_profile;
                @endphp
                <img class="img-circle sidebar-image elevation-2" src="{{ $profile_url }}" alt="User Image">
                @else
                <i class="fas fa-user"></i>
                @endif
            </div>
            <div class="info">
                @if(Auth::user())
                <a href="{{ route('user.profile',Auth::user()->id) }}" class="d-block">
                    {{ Auth::user()->full_name }}
                    <small class="text-light">({{ getUserType(Auth::user()->user_role) }})</small>
                </a>
                @endif
                <a href="{{ route('logout') }}" class="d-block"><span class="btn btn-sm btn-warning">Logout</span></a>
            </div>
        </div>

        <!-- SidebarSearch Form -->
        <div class="form-inline">
            <div class="input-group" data-widget="sidebar-search">
                <input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search">
                <div class="input-group-append">
                    <button class="btn btn-sidebar">
                        <i class="fas fa-search fa-fw fa-xs"></i>
                    </button>
                </div>
            </div>
        </div>

        <!-- Sidebar Menu -->
        <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
                <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->
                <li class="nav-item  {{ (request()->routeIs('dashboard')) ? 'active' : ''}}">
                    <a href="{{ route('dashboard') }}"
                        class="nav-link p-1 {{ (request()->routeIs('dashboard')) ? 'active' : ''}}">
                        <i class="nav-icon fas fa-tachometer-alt fa-xs"></i>
                        <p>
                            Dashboard
                        </p>
                    </a>
                </li>
                @if(Auth::user())
                @if(Auth::user()->user_role == 1 || Auth::user()->user_role == 2 || Auth::user()->user_role == 3)
                <li
                    class="nav-item {{ (request()->routeIs('create.new.employee') || request()->routeIs('list.all.employees') || request()->routeIs('edit.employee') || request()->routeIs('user.profile') || request()->routeIs('edit.profile') || request()->routeIs('edit.profile')) ? 'menu-open' : ''}}">
                    <a href="#"
                        class="nav-link p-1 {{ (request()->routeIs('create.new.employee') || request()->routeIs('list.all.employees') || request()->routeIs('edit.employee') || request()->routeIs('user.profile') || request()->routeIs('edit.profile') || request()->routeIs('edit.profile')) ? 'active' : ''}}">
                        <i class="nav-icon fa fa-users fa-xs"></i>
                        <p>
                            Manage Users
                            <i class="right fas fa-angle-left "></i>
                        </p>
                    </a>
                    <ul class="nav nav-treeview">
                        <li class="nav-item">
                            <a href="{{ route('create.new.employee') }}"
                                class="nav-link p-1 {{ (request()->routeIs('create.new.employee')) ? 'active' : ''}}">
                                <i class="fa fa-circle nav-icon fa-xs"></i>
                                <p>Create New User</p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ route('list.all.employees') }}"
                                class="nav-link p-1 {{ ( request()->routeIs('list.all.employees') || request()->routeIs('edit.employee') || request()->routeIs('user.profile') || request()->routeIs('edit.profile') || request()->routeIs('edit.profile')) ? 'active' : ''}}">
                                <i class="fa fa-circle nav-icon fa-xs"></i>
                                <p>Users Listing</p>
                            </a>
                        </li>
                    </ul>
                </li>
                @endif
                @endif
               
                 <li class="nav-item {{ (request()->routeIs('create.new.case')  || request()->routeIs('done.case.list')||request()->routeIs('update.hearing.done')||(request()->routeIs('list.allpending.cases')) || request()->routeIs('case.report.summary.details') || request()->routeIs('list.all.cases') || request()->routeIs('case.report.summary') || request()->routeIs('detailed.case.report') || request()->routeIs('view.cases.details') || request()->routeIs('edit.cases') || request()->routeIs('update.hearing') || request()->routeIs('create.case.remark')) ? 'menu-open' : ''}}">
                    <a href="#" class="nav-link p-1 {{ (request()->routeIs('create.new.case') ||request()->routeIs('done.case.list')|| request()->routeIs('update.hearing.done')||(request()->routeIs('list.allpending.cases')) || request()->routeIs('case.report.summary.details') || request()->routeIs('list.all.cases') || request()->routeIs('case.report.summary') || request()->routeIs('detailed.case.report') || request()->routeIs('view.cases.details') || request()->routeIs('edit.cases') || request()->routeIs('update.hearing') || request()->routeIs('create.case.remark')) ? 'active' : ''}}">
                        <i class="nav-icon fas fa-paste fa-xs"></i>
                        <p>
                            Manage Cases
                            <i class="right fas fa-angle-left "></i>
                        </p>
                    </a>
                    <ul class="nav nav-treeview">
                        <li class="nav-item">
                            <a href="{{ route('create.new.case',[2]) }}" class="nav-link p-1 {{ (request()->routeIs('create.new.case') || request()->routeIs('next.claim.form')) ? 'active' : ''}}">
                                <i class="fa fa-circle  nav-icon fa-xs"></i>
                                <p>New Case</p>
                            </a>
                        </li>
                          <li class="nav-item">
                            <a href="{{ route('list.allpending.cases') }}" class="nav-link p-1 {{ (request()->routeIs('list.allpending.cases')) ? 'active' : ''}}">
                                <i class="fa  fa-circle  nav-icon fa-xs"></i>
                                <p>All Pending Case</p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ route('list.all.cases') }}" class="nav-link p-1 {{ (request()->routeIs('list.all.cases') || request()->routeIs('view.claim.details') || request()->routeIs('view.cases.details') || request()->routeIs('edit.cases') || request()->routeIs('update.hearing') || request()->routeIs('create.case.remark')) ? 'active' : ''}}">
                                <i class="fa fa-circle  nav-icon fa-xs"></i>
                                <p>Case Listing/Direct Case</p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ route('case.report.summary') }}" class="nav-link p-1 {{ (request()->routeIs('case.report.summary') || request()->routeIs('case.report.summary.details')) ? 'active' : ''}}">
                                <i class="fa fa-circle nav-icon fa-xs"></i>
                                <p>Report Summary</p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{{ route('detailed.case.report') }}" class="nav-link p-1 {{ (request()->routeIs('detailed.case.report')) ? 'active' : ''}}">
                                <i class="fa  fa-circle  nav-icon fa-xs"></i>
                                <p>Detailed Report</p>
                            </a>
                        </li>
                        
                        <li class="nav-item">
                            <a href="{{ route('done.case.list') }}" class="nav-link p-1 {{ (request()->routeIs('done.case.list')||request()->routeIs('update.hearing.done')) ? 'active' : ''}}">
                                <i class="fa  fa-circle  nav-icon fa-xs"></i>
                                <p>Closed Case</p>
                            </a>
                        </li>
                    </ul>
                </li>
                <!--<li class="nav-item  {{ (request()->routeIs('download.forms')) ? 'active' : ''}}">	-->
                <!--    <a href="{{ route('download.forms') }}"	-->
                <!--        class="nav-link p-1 {{ (request()->routeIs('download.forms')) ? 'active' : ''}}">	-->
                <!--        <i class="nav-icon fas fa-download fa-xs"></i>	-->
                <!--        <p>	-->
                <!--            Downlod Form	-->
                <!--        </p>	-->
                <!--    </a>	-->
                <!--</li>-->
            </ul>
        </nav>
        <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
</aside>
