<header class="main-nav">
    <div class="sidebar-user text-center">
        <a class="setting-primary" href="{{ route('perfil-usuario') }}" title="Actualizar Información"><i data-feather="settings"></i></a><img class="img-sidebar-profile rounded-circle" src="{{ asset('storage/users/' .auth()->user()->imagen) }}" alt="" />
        <div class="badge-bottom"><span class="badge badge-primary">{{ auth()->user()->roles->first()->name }}</span></div>
        <a href="{{ route('perfil-usuario') }}"> <h6 class="mt-3 f-14 f-w-600">{{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</h6></a>
        <p class="mb-0 font-roboto">{{ auth()->user()->logoCompany()['company_name'] }}</p>
    </div>
    <nav>
        <div class="main-navbar">
            <div class="left-arrow" id="left-arrow"><i data-feather="arrow-left"></i></div>
            <div id="mainnav">
                <ul class="nav-menu custom-scrollbar">
                    <li class="back-btn">
                        <div class="mobile-back text-end"><span>Back</span><i class="fa fa-angle-right ps-2" aria-hidden="true"></i></div>
                    </li>
                    <li class="sidebar-main-title">
                        <div>
                            <h6>General</h6>
                        </div>
                    </li>
                    <li>
                        <a class="nav-link menu-title link-nav {{ routeActive('dashboard') }}" href="{{ route('dashboard') }}"><i data-feather="home"></i><span>Dashboard</span></a>
                    </li>
                    @can('Administration_menu')
                    <li class="dropdown">
                        <a class="nav-link menu-title {{ prefixActive('/admin') }}" href="javascript:void(0)"><i class="icofont icofont-gears m-r-15 f-18"></i><span>Administración</span></a>
                        <ul class="nav-submenu menu-content" style="display: {{ prefixBlock('/admin') }};">
                            @can('Settings_index')
                            <li>
                                <a href="{{ route('parametros') }}" class="{{ routeActive('parametros') }}">Parámetros</a>
                            </li>
                            @endcan
                            @can('Eps_index')
                            <li><a href="{{route('eps')}}" class="{{routeActive('eps')}}">Eps's</a></li>
                            @endcan
                            @can('Plan_index')
                            <li><a href="{{route('planes')}}" class="{{routeActive('planes')}}">Planes</a></li>
                            @endcan
                            @can('Type_work_permit_index')
                            <li><a href="{{route('tipos-permisos-laborales')}}" class="{{routeActive('tipos-permisos-laborales')}}">Tipos de Permisos Laborales</a></li>
                            @endcan
                            @can('Companies_index')
                            <li><a href="{{route('empresas')}}" class="{{ in_array(Route::currentRouteName(), ['empresas','empresas.usuarios']) ? 'active' : '' }}">Empresas</a></li>
                            @endcan
                            @can('Contract_index')
                            <li><a href="{{route('contratos')}}" class="{{in_array(Route::currentRouteName(), ['contratos','contratos.edit']) ? 'active' : '' }}">Contratos</a></li>
                            @endcan
                            @can('Annex_others_index')
                            <li><a href="{{route('anexos-otros-si')}}" class="{{routeActive('anexos-otros-si')}}">Anexos Otrosí</a></li>
                            @endcan
                            @can('CvEmployee_index')
                            <li><a href="{{route('cv')}}" class="{{ in_array(Route::currentRouteName(), ['cv','cv.edit']) ? 'active' : '' }}">Hoja de vida</a></li>
                            @endcan
                        </ul>
                    </li>
                    @endcan
                    @can('Companies_menu')
                    <li class="dropdown">
                        <a class="nav-link menu-title {{ prefixActive('/empresa') }}" href="javascript:void(0)"><i class="icofont icofont-building-alt m-r-15 f-18"></i><span>Empresa</span></a>
                        <ul class="nav-submenu menu-content" style="display: {{ prefixBlock('/empresa') }};">
                            @can('Company_configuration_index')
                            <li><a href="{{route('configuracion-empresa')}}" class="{{routeActive('configuracion-empresa')}}">Configuración Empresa</a></li>
                            @endcan
                            @can('Company_type_psychotechnics_test_index')
                            <li><a href="{{route('tipos-pruebas-psicotecnicas')}}" class="{{routeActive('tipos-pruebas-psicotecnicas')}}">Tipos Pruebas Psicotécnicas</a></li>
                            @endcan
                            @can('Company_document_type_index')
                            <li><a href="{{route('tipos-documentos')}}" class="{{routeActive('tipos-documentos')}}">Tipos Documentos</a></li>
                            @endcan
                            @can('Company_job_positions_index')
                            <li><a href="{{route('cargos')}}" class="{{routeActive('cargos')}}">Cargos</a></li>
                            @endcan
                            @can('Company_work_permit_index')
                            <li><a href="{{route('permisos-laborales')}}" class="{{routeActive('permisos-laborales')}}">Permisos Laborales</a></li>
                            @endcan
                            @can('Company_work_certificate_index')
                            <li><a href="{{route('certificados-laborales')}}" class="{{routeActive('certificados-laborales')}}">Certificados Laborales</a></li>
                            @endcan
                            @can('Company_users')
                            <li><a href="{{route('usuarios')}}" class="{{routeActive('admin')}}">Usuarios</a></li>
                            @endcan
                            @can('Company_register_users_index')
                            <li><a href="{{route('empresa.usuarios')}}" class="{{routeActive('empresa.usuarios')}}">Usuarios</a></li>
                            @endcan
                            @can('Company_employees_index')
                            <li>
                                <a class="submenu-title {{ in_array(Route::currentRouteName(), ['empleados','importar-empleados']) ? 'active' : '' }}" href="javascript:void(0)">
                                    Empleados<span class="sub-arrow"><i class="fa fa-chevron-right"></i></span>
                                </a>
                                <ul class="nav-sub-childmenu submenu-content" style="display: {{ in_array(Route::currentRouteName(), ['empleados','importar-empleados']) ? 'block' : 'none' }};">
                                    <li><a href="{{ route('empleados') }}" class="{{routeActive('empleados')}}">Listado</a></li>
                                    @can('Company_employees_import')
                                        <li><a href="{{ route('importar-empleados') }}" class="{{routeActive('importar-empleados')}}">Importar</a></li>
                                    @endcan
                                </ul>
                            </li>
                            @endcan
                            @can('Company_contracts_users_index')
                            <li><a href="{{route('contratos-empleados')}}" class="{{ in_array(Route::currentRouteName(), ['contratos-empleados','contratos-empleados.historial','contratos-empleados.create','contratos-empleados.firmar','perfil-empleado']) ? 'active' : '' }}">Contratos</a></li>
                            @endcan
                            @can('Company_permissions_employees')
                            <li><a href="{{route('asignar')}}" class="{{routeActive('asignar')}}">Permisos</a></li>
                            @endcan
                            @can('Company_reports_employees')
                            <li><a href="{{route('informes-empleados')}}" class="{{routeActive('informes-empleados')}}">Informes</a></li>
                            @endcan
                        </ul>
                    </li>
                    @endcan
                    @can('Users_menu')
                    <li class="dropdown">
                        <a class="nav-link menu-title {{ prefixActive('/usuarios') }}" href="javascript:void(0)"><i data-feather="users"></i><span>Usuarios</span></a>
                        <ul class="nav-submenu menu-content" style="display: {{ prefixBlock('/usuarios') }};">
                            @can('User_index')
                            <li><a href="{{route('usuarios')}}" class="{{routeActive('usuarios')}}">Usuarios</a></li>
                            @endcan
                            @can('Role_index')
                            <li><a href="{{route('roles')}}" class="{{routeActive('roles')}}">Roles</a></li>
                            @endcan
                            @can('Permission_index')
                            <li><a href="{{route('permisos')}}" class="{{routeActive('permisos')}}">Permisos</a></li>
                            @endcan
                            @can('Assign_index')
                            <li><a href="{{route('asignar')}}" class="{{routeActive('asignar')}}">Asignar</a></li>
                            @endcan
                        </ul>
                    </li>
                    @endcan
                    @can('Employee_menu')
                    <li class="dropdown">
                        <a class="nav-link menu-title {{ prefixActive('/empleado') }}" href="javascript:void(0)"><i data-feather="user"></i><span>Empleado</span></a>
                        <ul class="nav-submenu menu-content" style="display: {{ prefixBlock('/empleado') }};">
                            @can('Employee_index')
                            <li><a href="{{route('empleado-perfil')}}" class="{{routeActive('empleado-perfil')}}">Información</a></li>
                            @endcan
                            @can('CvEmployee_detail_index')
                            <li><a href="{{route('empleado-cv')}}" class="{{routeActive('empleado-cv')}}">Hoja de vida</a></li>
                            @endcan
                            @can('Employee_documents_index')
                            <li><a href="{{route('empleado-documentos')}}" class="{{routeActive('empleado-documentos')}}">Documentos</a></li>
                            @endcan
                            @can('Employee_payment_voucher_index')
                            <li><a href="{{route('empleado-desprendibles-pagos')}}" class="{{routeActive('empleado-desprendibles-pagos')}}">Desprendibles de Pago</a></li>
                            @endcan
                            @can('Employee_work_permits_index')
                            <li><a href="{{route('empleado-permisos-laborales')}}" class="{{routeActive('empleado-permisos-laborales')}}">Permisos Laborales</a></li>
                            @endcan
                            @can('Employee_work_certificates_index')
                            <li><a href="{{route('empleado-certificados-laborales')}}" class="{{routeActive('empleado-certificados-laborales')}}">Certificados Laborales</a></li>
                            @endcan
                            @can('Employee_contracts_index')
                            <li><a href="{{route('empleado-contratos')}}" class="{{routeActive('empleado-contratos')}}">Contratos</a></li>
                            @endcan
                        </ul>
                    </li>
                    @endcan
                    @can('Report_menu')
                    @endcan

                </ul>
            </div>
            <div class="right-arrow" id="right-arrow"><i data-feather="arrow-right"></i></div>
        </div>
    </nav>
</header>
