<div class="left-side">
    <div class="nav-collapse">
        <div class="collapse-head">
            <a class="title-tiny-middle text-700" role="button">{{ __('messages.menu') }}</a>
        </div>
        <div class="collapse-item show">
            <a href="{{route('super-admin.dashboard')}}"
               class="collapse-item-single title-small {{ Route::is('super-admin.dashboard') ? 'active' : '' }}"><i
                    class="dashboard-ico"></i><span class="menu-name">{{ __('messages.dashboard') }}</span>
            </a>

            @canany(['user.list','role.list'])
                <div class="nav-collapse">
                    <div
                        class="collapse-head {{ Route::is('super-admin.users.index') || Route::is('super-admin.roles.index') || Route::is('super-admin.users.create') || Route::is('super-admin.roles.create') || Route::is('super-admin.users.edit') || Route::is('super-admin.roles.edit') || Route::is('super-admin.users.show')  ? 'active ' : '' }}">
                        <a class="title-small"
                           role="button"><i class="user-management-ico"></i><span
                                class="menu-name">{{ __('messages.user_management') }} </span></a>
                    </div>
                    <div
                        class="collapse-item {{ Route::is('super-admin.roles.index') || Route::is('super-admin.roles.create') || Route::is('super-admin.roles.edit') || Route::is('super-admin.users.index') || Route::is('super-admin.users.create') || Route::is('super-admin.users.edit') ? 'active ' : '' }}">
                        @can('user.list')
                            <a href="{{route('super-admin.users.index')}}"
                               class="title-small {{ Route::is('super-admin.users.index') || Route::is('super-admin.users.create') || Route::is('super-admin.users.edit') ? 'active ' : '' }}"><span
                                    class="sub-menu-name">{{ __('messages.users') }}</span></a>
                        @endcan
                        @can('role.list')
                            <a href="{{route('super-admin.roles.index')}}"
                               class="title-small {{ Route::is('super-admin.roles.index') || Route::is('super-admin.roles.create') || Route::is('super-admin.roles.edit') ? 'active ' : '' }}"><span
                                    class="sub-menu-name">{{ __('messages.role') }}</span></a>
                        @endcan
                    </div>
                </div>
            @endcanany
        </div>
    </div>
    <hr class="nav-collapse-separator"/>
    <div class="nav-collapse">
        <div class="collapse-head">
            <a class="title-tiny-middle text-700" role="button">
                {{ __('messages.apps') }}
            </a>
        </div>
        <div class="collapse-item show">
            @can('employee.list')
                <div class="nav-collapse">
                    <div
                        class="collapse-head {{ Route::is('employees.index') || Route::is('employees.lifetime-history.index') || Route::is('employees.create') || Route::is('employees.lifetime-history.show') || Route::is('employees.edit') || Route::is('employees.show')  ? 'active ' : '' }}">
                        <a class="title-small text-500" role="button">
                            <i class="employee-management-ico"></i>
                            <span class=" menu-name">{{ __('messages.employee_management') }}</span>
                        </a>
                    </div>

                    <div
                        class="collapse-item {{ Route::is('employees.index') || Route::is('employees.lifetime-history.index') || Route::is('employees.create') || Route::is('employees.lifetime-history.show') || Route::is('employees.edit') || Route::is('employees.show')  ? 'active ' : '' }} ">
                        <a href=" {{route('employees.index')}}" class="title-small"><span
                                class="sub-menu-name {{Route::is('employees.index') || Route::is('employees.create') || Route::is('employees.edit') || Route::is('employees.show') ? 'active ' : '' }}">{{ __('messages.employee_registration') }}</span></a>
                        {{-- {{route('employees.lifetime-history.index')}} --}}
                        <a href="#"
                           class="title-small {{ Route::is('employees.index') || Route::is('employees.lifetime-history.show') ? 'active ' : '' }}"><span
                                class="sub-menu-name">{{ __('messages.service_record') }}</span></a>
                    </div>
                </div>
            @endcan
        </div>
        {{-- Menu without permission starts --}}


        <div class="collapse-item show">
            @canany(['schedule.list'])
                <div class="nav-collapse">
                    <div
                        class="collapse-head {{ Route::is('schedules.index')  ? 'active ' : '' }}">
                        <a class="title-small text-500" role="button">
                            <i class="employee-management-ico"></i>
                            <span class=" menu-name">
                                {{ __('messages.attendance_manage') }}
                            </span>
                        </a>
                    </div>

                    <div
                        class="collapse-item {{ Route::is('schedules.index') ? 'active ' : '' }} ">
                        <a href="{{route('schedules.index')}}" class="title-small">
                            <span class="sub-menu-name {{Route::is('schedules.index') ? 'active ' : '' }}">
                                {{ __('messages.schedules') }}
                            </span>
                        </a>
                        {{-- <a href="{{route('manualAtts.index')}}" class="title-small">
                            <span class="sub-menu-name {{Route::is('manualAtts.index') ? 'active ' : '' }}">
                                Attendance Entry
                            </span>
                        </a> || Route::is('manualAtts.index') --}}
                    </div>
                </div>
            @endcanany
        </div>


        {{-- Menu without permission ends --}}



        <div class="collapse-item show">
            @canany(['leave.list','holiday.list','leave.leaveType'])
                <div class="nav-collapse">
                    <div
                        class="collapse-head {{ Route::is('leaves.index') || Route::is('holidays.index') || Route::is('leaves.leaveType')  ? 'active ' : '' }}">
                        <a class="title-small text-500" role="button">
                            <i class="employee-management-ico"></i>
                            <span class="menu-name">
                                {{ __('messages.allLeave') }} {{ __('messages.manage') }}
                            </span>
                        </a>
                    </div>

                    <div
                        class="collapse-item {{ Route::is('leaves.index') || Route::is('holidays.index') || Route::is('leaves.leave_type') ? 'active ' : '' }} ">

                        <a href="{{route('holidays.index')}}" class="title-small">
                            <span class="sub-menu-name {{ Route::is('holidays.index') ? 'active ' : '' }}">
                                {{ __('messages.holiday') }}
                            </span>
                        </a>
                        <a href="{{route('leaves.leave_type')}}" class="title-small">
                            <span class="sub-menu-name {{Route::is('leaves.leave_type') ? 'active ' : '' }}">
                                {{ __('messages.leave') }} {{ __('messages.type') }}
                            </span>
                        </a>
                        <a href="{{route('leaves.index')}}" class="title-small">
                            <span class="sub-menu-name {{ Route::is('leaves.index') ? 'active ' : '' }}">
                                {{ __('messages.leave') }} {{ __('messages.application') }}
                            </span>
                        </a>
                    </div>
                </div>
            @endcanany
        </div>

        {{-- Attendance Report --}}
        <div class="collapse-item show">
            @canany(['hr_report.attendFilterMulti'])
                <div class="nav-collapse">
                    <div
                        class="collapse-head {{ Route::is('hr_reports.attendFilterMultis') || Route::is('hr_reports.attendStatusFilters')  ? 'active ' : '' }}">
                        <a class="title-small text-500" role="button">
                            <i class="employee-management-ico"></i>
                            <span class="menu-name">
                                {{-- {{ __('messages.leave') }} {{ __('messages.manage') }} --}}
                                HR Reports
                            </span>
                        </a>
                    </div>

                    <div
                        class="collapse-item {{ Route::is('hr_reports.attendFilterMultis') || Route::is('hr_reports.attendStatusFilters') ? 'active ' : '' }} ">
                        <a href="{{route('hr_reports.attendFilterMultis')}}" class="title-small">
                            <span class="sub-menu-name {{Route::is('hr_reports.attendFilterMultis') ? 'active ' : '' }}">
                                {{-- {{ __('messages.leave') }} {{ __('messages.type') }} --}}
                                Attendance List Report
                            </span>
                        </a>

                        <a href="{{route('hr_reports.attendStatusFilters')}}" class="title-small">
                            <span class="sub-menu-name {{Route::is('hr_reports.attendStatusFilters') ? 'active ' : '' }}">
                                Day's Attendance Status
                            </span>
                        </a>
                    </div>
                </div>
            @endcanany
        </div>
        {{-- Report Ends --}}

    </div>


    <hr class="nav-collapse-separator"/>


    {{-- @canany(['action peremeter.view','organization.list','herd.list','lot.list','tag.list','breed.list','vaccine.list','dewormer.list','feed.list','sire.list','disease.list','lab test.list','medicine group.list','medicine.list','statistics report.list']) --}}
        {{-- <div class="nav-collapse">
            <div class="collapse-head">
                <a class="title-tiny-middle text-700" role="button">{{ __('messages.settings') }}</a>
            </div>
            <div class="collapse-item show">
                @can('action peremeter.view')
                    <a href="{{route('action-perameters.index')}}"
                       class="collapse-item-single title-small text-500 {{ Route::is('action-perameters.index') ? 'active ' : '' }}">
                       <i class="action-parameter-ico"></i><span
                            class="menu-name">{{ __('messages.action_parameter') }}</span></a>
                @endcan
                @can('action peremeter.view')
                    <a href="{{route('app-settings.index')}}"
                       class="collapse-item-single title-small text-500 {{ Route::is('app-settings.index') ? 'active ' : '' }}"><i
                            class="app-settings-ico"></i><span
                            class="menu-name">{{ __('messages.app_settings') }}</span></a>
                @endcan
            </div>
        </div> --}}









    @canany(['action peremeter.view','organization.list'])

    <div class="nav-collapse">
        <div class="collapse-head">
            <a class="title-tiny-middle text-700" role="button">
                <a class="title-tiny-middle text-700" role="button">{{ __('messages.settings') }}</a>
            </a>
        </div>
        <div class="collapse-item show">
            <div class="nav-collapse">

                <div
                    class="collapse-head {{ Route::is('organizations.index') || Route::is('action peremeter.view')  ? 'active ' : '' }}">

                    <a class="title-small text-500" role="button">
                        <i class="app-settings-ico"></i>
                        <span class=" menu-name">{{ __('messages.general_settings') }}</span>
                    </a>

                </div>

                <div
                    class="collapse-item {{ Route::is('organizations.index') || Route::is('organizations.create') || Route::is('organizations.edit') || Route::is('organizations.show') || Route::is('action-perameters.index')  ? 'active ' : '' }} ">

                    {{-- @can('organization.list') --}}
                    <a href="{{route('organizations.index')}}" class="title-small">
                        <span class="sub-menu-name {{Route::is('organizations.index') || Route::is('organizations.create') || Route::is('organizations.edit') || Route::is('organizations.show') ? 'active ' : '' }}">{{ __('messages.organizations') }}</span>
                    </a>
                    {{-- @endcan --}}

                    {{-- @can('action peremeter.view')
                    <a href="{{route('action-perameters.index')}}" class="collapse-item-single title-small text-500 {{ Route::is('action-perameters.index') ? 'active ' : '' }}">
                       <i class="action-parameter-ico"></i>
                       <span class="menu-name">{{ __('messages.action_parameter') }}</span>
                    </a>
                    @endcan --}}

                    {{-- @can('action peremeter.view')
                    <a href="{{route('action-perameters.index')}}" class="title-small">
                       <span class="sub-menu-name {{Route::is('action-perameters.index') ? 'active ' : '' }}">{{ __('messages.action_parameter') }}</span>
                    </a>
                    @endcan --}}

                </div>
            </div>
        </div>
    </div>
    @endcanany
</div>
