@if(hasPermission('leave_type_read') || hasPermission('leave_assign_read') || hasPermission('leave_request_read') || hasPermission('leave_balance_read'))
    <li class="sidebar-menu-item {{ set_menu([route('leave.index'), route('assignLeave.index')]) }}">
        <a href="javascript:void(0)"
           class="parent-item-content has-arrow {{ menu_active_by_route(['leave.index', 'leave.create', 'leave.edit', 'assignLeave.index', 'assignLeave.create', 'assignLeave.edit', 'leaveRequest.index', 'leaveRequest.create', 'daily_leave.index', 'daily_leave.create', 'leaveRequest.balance.*', 'leaveRequest.balance','leave-reports.leave-report','leave-reports.tardy-report']) }}">
            <i class="las la-sign-out-alt"></i>
            <span class="on-half-expanded"> {{ _trans('common.Leave') }}</span>
        </a>
        <ul class="child-menu-list {{ set_active(['hrm/leave','hrm/leave/assign*', 'hrm/leave/request*', 'dashboard/user/leave-balance*', 'hrm/daily-leave*', 'dashboard/leave*','hrm/leave/reports/leave-report','hrm/leave/reports/tardy-report']) }}">
            @if (hasPermission('leave_type_read'))
                <li class="nav-item {{ menu_active_by_route(['leave.index', 'leave.create', 'leave.edit']) }}">
                    <a href="{{ route('leave.index') }}"
                       class=" {{ set_active(route('leave.index')) }}">
                        <span>{{ _trans('common.Leave Type') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('leave_assign_read'))
                <li class="nav-item {{ menu_active_by_route(['assignLeave.index', 'assignLeave.create', 'assignLeave.edit']) }}">
                    <a href="{{ route('assignLeave.index') }}"
                       class=" {{ set_active(route('assignLeave.index')) }}">
                        <span> {{ _trans('leave.Leave Assign') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('leave_request_read'))
                <li class="nav-item {{ menu_active_by_route(['leaveRequest.index', 'leaveRequest.create']) }}">
                    <a href="{{ route('leaveRequest.index') }}"
                       class=" {{ set_active(route('leaveRequest.index')) }}">
                        <span>{{ _trans('leave.Leave Request') }}</span>
                    </a>
                </li>
            @endif

            @if (hasPermission('leave_balance_read'))
                <li class="nav-item {{ menu_active_by_route(['leaveRequest.balance']) }}">
                    <a href="{{ route('leaveRequest.balance') }}"
                       class=" {{ set_active(route('leaveRequest.balance')) }}">
                        <span>{{ _trans('common.Leave Balance') }}</span>
                    </a>
                </li>
            @endif
        </ul>
    </li>
@endif