{{-- <li class="nav-item bg-danger-light">
    <a href="{{ route('clientSearch') }}"
        class="nav-link {{ request()->routeIs(['clientSearch']) ? 'active' : '' }}">
        <i
            class="ml-3 far fas fa-search nav-icon" style="font-size: 10px"></i>
        <p>Search Customer</p>
    </a>
</li> --}}

<li class="nav-item {{ request()->routeIs(['clientSearch']) ? 'menu-open' : '' }}">
    <a href="{{ route('clientSearch') }}" class="nav-link">
        <i class=" fas fa-search nav-icon"></i>
        <p>Customer Search </p>
    </a>

</li>
@can('client_register_list')
    <li class="nav-item {{ request()->routeIs(['clientRegisterList']) ? 'menu-open' : '' }}">
        <a href="{{ route('clientRegisterList') }}" class="nav-link">
            <i class="fas fa-book nav-icon"></i>
            <p>Connection Request</p>
        </a>
    </li>
@endcan

<li
    class="nav-item {{ request()->routeIs(['clients*', 'onlineCustomer', 'oflineCustomer', 'deletedCustomer', 'packageChange', 'billingCycleChange', 'deactivatedClients', 'newJoin', 'list', 'pendingCustomer', 'expiredClients', 'disableCustomer', 'activeCustomer', 'bulk-expariy-date-extended', 'leftClient', 'line-shift.index', 'localPendingCustomer', 'accountsPendingCustomer', 'freeClient']) ? 'menu-open' : '' }}">
    <a href="#" class="nav-link">
        <i class=" fas fa-user nav-icon"></i>
        <p>Customers
            <i class="fas fa-angle-left right"></i>
        </p>
    </a>
    <ul class="nav nav-treeview">

        @can('active-customer')
            <li class="nav-item">
                <a href="{{ route('activeCustomer') }}"
                    class="nav-link {{ request()->routeIs(['activeCustomer']) ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-user-check nav-icon" style="font-size: 10px"></i>
                    <p>Active Customers</p>
                </a>
            </li>
        @endcan

        @can('mac-customer_create')
            <li class="nav-item">
                <a href="{{ route('clients.create') }}"
                    class="nav-link {{ request()->routeIs(['clients.create']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-plus nav-icon" style="font-size: 10px"></i>
                    <p>Add Customer</p>
                </a>

            </li>
        @endcan

        {{-- @if (getBillingType() != 'day_to_day') --}}
        @can('changeBillCycle')
            <li class="nav-item">
                <a href="{{ route('billingCycleChange') }}"
                    class="nav-link {{ request()->routeIs(['billingCycleChange']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-calendar-plus nav-icon" style="font-size: 10px"></i>
                    <p>Billing Cycle Change</p>
                </a>
            </li>
        @endcan
        {{-- @endif --}}

        @can('bulk-date-extended')
            <li class="nav-item">

                <a href="{{ route('bulk-expariy-date-extended') }}"
                    class="nav-link {{ request()->routeIs(['bulk-expariy-date-extended']) ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-calendar-check nav-icon" style="font-size: 10px"></i>
                    <p>Bulk Date Extend</p>

                </a>
            </li>
        @endcan

        @can('client-import')
            <li class="nav-item">
                <a href="{{ route('client-import-to-customer') }}"
                    class="nav-link {{ request()->routeIs(['client-import-to-customer']) ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-calendar-check nav-icon" style="font-size: 10px"></i>
                    <p>Client Import</p>
                </a>
            </li>
        @endcan

        <li class="nav-item">
            <a href="{{ route('list', 'close-list') }}"
                class="nav-link {{ request()->path() == 'admin/list/close-list' ? 'active' : '' }}">
                <i class="ml-3 far fas fa-trash nav-icon" style="font-size: 10px"></i>
                <p>Close Customers</p>
            </a>
        </li>

        @can('mac-customer_index')
            <li class="nav-item">
                <a href="{{ route('clients.index') }}"
                    class="nav-link {{ request()->routeIs(['clients.index']) ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-list nav-icon" style="font-size: 10px"></i>
                    <p>Customers List</p>
                </a>

            </li>
        @endcan

        @can('deactivated-customer_index')
            <li class="nav-item">
                <a href="{{ route('deactivatedClients') }}"
                    class="nav-link {{ request()->routeIs(['deactivatedClients']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-user-minus nav-icon" style="font-size: 10px"></i>
                    <p>Deactivated Customers</p>

                </a>
            </li>
        @endcan

        @can('disable-customer')
            <li class="nav-item">
                <a href="{{ route('list', 'disable-customer') }}"
                    class="nav-link {{ request()->path() == 'admin/list/disable-customer' ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-users-slash nav-icon" style="font-size: 10px"></i>
                    <p>Disable Customers</p>
                </a>
            </li>
        @endcan
        @can('free-client')
            <li class="nav-item">
                <a href="{{ route('freeClient') }}"
                    class="nav-link {{ request()->path() == 'admin/free-client' ? 'active' : '' }}">
                    <i class="ml-3 fa-solid fa-person-running nav-icon" style="font-size: 10px"></i>
                    <p>Free Client</p>
                </a>
            </li>
        @endcan

        @can('deletedUser')
            <li class="nav-item">
                <a href="{{ route('deletedCustomer') }}"
                    class="nav-link {{ request()->routeIs(['deletedCustomer']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-user-slash nav-icon" style="font-size: 10px"></i>
                    <p>Deleted Customers</p>
                </a>

            </li>
        @endcan

        @can('expire-customer')
            <li class="nav-item">
                <a href="{{ route('list', 'expired-Clients') }}"
                    class="nav-link {{ request()->path() == 'admin/list/expired-Clients' ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-calendar-minus nav-icon" style="font-size: 10px"></i>
                    <p>Expired Customers</p>
                </a>
            </li>
        @endcan

        @can('leftclient')
            <li class="nav-item">
                <a href="{{ route('leftClient') }}"
                    class="nav-link {{ request()->path() == 'admin/leftClient' ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-calendar-minus nav-icon" style="font-size: 10px"></i>
                    <p>Left Clients</p>
                </a>
            </li>
        @endcan

        @can('line-shift')
            <li class="nav-item">
                <a href="{{ route('line-shift.index') }}"
                    class="nav-link {{ request()->routeIs(['line-shift.index']) ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-calendar-check nav-icon" style="font-size: 10px"></i>
                    <p>Line Shift</p>
                </a>
            </li>
        @endcan

        @can('oflineUser')
            <li class="nav-item">
                <a href="{{ route('oflineCustomer') }}"
                    class="nav-link {{ request()->routeIs(['oflineCustomer']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-users-slash nav-icon" style="font-size: 10px"></i>
                    <p>Offline Customers</p>
                </a>

            </li>
        @endcan

        @can('onlineUser')
            <li class="nav-item">
                <a href="{{ route('onlineCustomer') }}"
                    class="nav-link  {{ request()->routeIs(['onlineCustomer']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-globe nav-icon" style="font-size: 10px"></i>
                    <p>Online Customers</p>
                </a>
            </li>
        @endcan

        @can('changePackage')
            <li class="nav-item">
                <a href="{{ route('packageChange') }}"
                    class="nav-link {{ request()->routeIs(['packageChange']) ? 'active' : '' }}"><i
                        class="ml-3 far fas fa-box nav-icon" style="font-size: 10px"></i>
                    <p>Package Change</p>
                </a>
            </li>
        @endcan

        @can('monthly-paid-customer-list')
            <li class="nav-item">
                <a href="{{ route('monthlyPaidCustomer') }}"
                    class="nav-link {{ request()->routeIs(['monthlyPaidCustomer']) ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-spinner nav-icon" style="font-size: 10px"></i>
                    <p>Paid Customers</p>
                </a>
            </li>
        @endcan

        <li class="nav-item">

            <a href="{{ route('pendingCustomer') }}"
                class="nav-link {{ request()->routeIs(['pendingCustomer']) ? 'active' : '' }}">
                <i class="ml-3 far fas fa-spinner nav-icon" style="font-size: 10px"></i>
                <p>Pending Customers</p>
                <span class="bg-red-600 rounded-full text-white py-0 px-2">{{ session('pendingCustomer') }}</span>
            </a>
        </li>

        @if (checkSettings('local-user-first-approve') == 'enable')
            @if (auth()->user()->can('local-user-first-approve'))
                <li class="nav-item">
                    <a href="{{ route('accountsPendingCustomer') }}"
                        class="nav-link {{ request()->routeIs(['accountsPendingCustomer']) ? 'active' : '' }}">
                        <i class="ml-3 far fas fa-spinner nav-icon" style="font-size: 10px"></i>
                        <p>Accounts Pending Customers</p>
                        <span
                            class="bg-red-600 rounded-full text-white py-0 px-2">{{ session('accountsPendingCustomer') }}</span>
                    </a>
                </li>
            @endif
        @endif

        @can('newjoin')
            <li class="nav-item">
                <a href="{{ route('list', 'new-join') }}"
                    class="nav-link {{ request()->path() == 'admin/list/new-join' ? 'active' : '' }}">
                    <i class="ml-3 far fas fa-folder-open nav-icon" style="font-size: 10px"></i>
                    <p>Recent Customers</p>
                </a>
            </li>
        @endcan


        @if (globalPermission('onu_information_laser'))
            @can('onu_information_laser')
                <li class="nav-item">
                    <a href="{{ route('onu-information') }}"
                        class="nav-link {{ request()->path() == 'admin/onu-information' ? 'active' : '' }}">
                        <i class="ml-3 fas fa-network-wired nav-icon" style="font-size: 10px"></i>
                        <p>Onu Information</p>
                    </a>
                </li>
            @endcan
        @endif
    </ul>
</li>
