<div class="side-nav">
    <div class="side-nav-inside">
        <ul class="side-nav-menu">

            <li class="side-nav-item {{ isActive('admin.dashboard') }}">
                <a href="{{ route('admin.dashboard') }}"><i
                        data-lucide="layout-dashboard"></i><span>{{ __('Dashboard') }}</span></a>
            </li>

            {{-- ************************************************************* Customer Management ********************************************************* --}}
            @canany(['customer-list', 'customer-login', 'customer-mail-send', 'customer-basic-manage',
                'customer-balance-add-or-subtract', 'customer-change-password', 'all-type-status'])
                <li class="side-nav-item side-nav-dropdown {{ isActive(['admin.user*', 'admin.notification*']) }}">
                    <a href="javascript:void(0);" class="dropdown-link">
                        <i data-lucide="users"></i><span>{{ __('Customers') }}</span>
                        <span class="right-arrow"><i data-lucide="chevron-down"></i></span></a>
                    <ul class="dropdown-items">
                        @canany(['customer-list', 'customer-login', 'customer-mail-send', 'customer-basic-manage',
                            'customer-balance-add-or-subtract', 'customer-change-password', 'all-type-status'])
                            <li class="{{ isActive('admin.user.index') }}">
                                <a href="{{ route('admin.user.index') }}"><i
                                        data-lucide="users"></i>{{ __('All Customers') }}</a>
                            </li>

                            <li class="{{ isActive('admin.user.new') }}">
                                <a href="{{ route('admin.user.new') }}"><i
                                        data-lucide="user-plus"></i>{{ __('Add New Customer') }}</a>
                            </li>
                        @endcanany
                    </ul>
                </li>
            @endcanany


            {{-- ************************************************************* Staff Management ********************************************************* --}}
            @canany(['role-list', 'role-create', 'role-edit', 'staff-list', 'staff-create', 'staff-edit'])
                <li class="side-nav-item side-nav-dropdown {{ isActive(['admin.roles*', 'admin.staff*']) }}">
                    <a href="javascript:void(0);" class="dropdown-link"><i
                            data-lucide="shield"></i><span>{{ __('System Access') }}</span>
                        <span class="right-arrow"><i data-lucide="chevron-down"></i></span></a>
                    <ul class="dropdown-items">
                        @canany(['role-list', 'role-create', 'role-edit'])
                            <li class="{{ isActive('admin.roles*') }}">
                                <a href="{{ route('admin.roles.index') }}"><i
                                        data-lucide="contact"></i><span>{{ __('Manage Roles') }}</span></a>
                            </li>
                        @endcanany
                        @canany(['staff-list', 'staff-create', 'staff-edit'])
                            <li class="{{ isActive('admin.staff*') }}">
                                <a href="{{ route('admin.staff.index') }}"><i
                                        data-lucide="user-cog"></i><span>{{ __('Manage Staffs') }}</span></a>
                            </li>
                        @endcanany
                    </ul>
                </li>
            @endcanany

            {{-- ************************************************************* Space Management ********************************************************* --}}
            @canany(['space-list', 'space-create', 'space-edit', 'space-delete', 'space-type-list', 'space-type-create',
                'space-type-edit', 'space-type-delete', 'location-create', 'location-list', 'location-edit',
                'location-delete'])
                <li
                    class="side-nav-item side-nav-dropdown {{ isActive(['admin.space*', 'admin.space-type*', 'admin.location.*']) }}">
                    <a href="javascript:void(0);" class="dropdown-link"><i
                            data-lucide="school"></i><span>{{ __('Space Management') }}</span>
                        <span class="right-arrow"><i data-lucide="chevron-down"></i></span></a>
                    <ul class="dropdown-items">
                        @canany(['space-list', 'space-create', 'space-edit', 'space-delete'])
                            <li class="{{ isActive('admin.space.*') }}">
                                <a href="{{ route('admin.space.index') }}"><i
                                        data-lucide="school"></i><span>{{ __('All Spaces') }}</span></a>
                            </li>
                        @endcanany
                        @canany(['space-type-list', 'space-type-create', 'space-type-edit', 'space-type-delete'])
                            <li class="side-nav-item {{ isActive('admin.space-type.*') }}">
                                <a href="{{ route('admin.space-type.index') }}"><i
                                        data-lucide="align-justify"></i><span>{{ __('Space Types') }}</span></a>
                            </li>
                        @endcanany

                        @if (multiLocationEnabled())
                            @canany(['location-create', 'location-list', 'location-edit', 'location-delete'])
                                <li class="side-nav-item {{ isActive('admin.location.*') }}">
                                    <a href="{{ route('admin.location.index') }}"><i
                                            data-lucide="map-pinned"></i><span>{{ __('Locations') }}</span></a>
                                </li>
                            @endcanany
                        @endif
                    </ul>
                </li>
            @endcanany

            {{-- ************************************************************* Space Management ********************************************************* --}}
            @canany(['booking-list', 'booking-action'])
                <li class="side-nav-item {{ isActive('admin.bookings.*') }}">
                    <a href="{{ route('admin.bookings.index') }}">
                        <i data-lucide="blinds"></i>
                        <span>{{ __('Bookings') }}</span>
                    </a>
                </li>
            @endcanany

            {{-- ************************************************************* Payments ********************************************************* --}}
            @canany(['transaction-list', 'payment-action'])
                <li
                    class="side-nav-item side-nav-dropdown {{ isActive(['admin.payment.manual.pending', 'admin.transactions']) }}">
                    <a href="javascript:void(0);" class="dropdown-link">
                        <i data-lucide="badge-dollar-sign"></i>
                        <span>{{ __('Payments') }}</span>
                        <span class="right-arrow">
                            <i data-lucide="chevron-down"></i>
                        </span>
                    </a>
                    <ul class="dropdown-items">
                        @can('payment-action')
                            <li class="{{ isActive('admin.payment.manual.pending') }}">
                                <a href="{{ route('admin.payment.manual.pending') }}"><i
                                        data-lucide="circle-dashed"></i>{{ __('Pending Payments') }}
                                </a>
                            </li>
                        @endcan

                        @can('transaction-list')
                            <li class="{{ isActive('admin.transactions') }}">
                                <a href="{{ route('admin.transactions') }}"><i
                                        data-lucide="history"></i>{{ __('All Histories') }}
                                </a>
                            </li>
                        @endcan
                    </ul>
                </li>
            @endcanany

            {{-- ************************************************************* Gateways ********************************************************* --}}

            @canany(['automatic-gateway-manage', 'manual-gateway-manage'])
                <li class="side-nav-item category-title">
                    <span>{{ __('Gateways') }}</span>
                </li>
                @can('automatic-gateway-manage')
                    <li class="side-nav-item {{ isActive('admin.gateway*') }}">
                        <a href="{{ route('admin.gateway.automatic') }}"><i
                                data-lucide="door-open"></i><span>{{ __('Automatic Gateways') }}</span></a>
                    </li>
                @endcan

                <li class="side-nav-item side-nav-dropdown {{ isActive(['admin.payment.method.list']) }}">
                    <a href="javascript:void(0);" class="dropdown-link">
                        <i data-lucide="arrow-down-circle"></i>
                        <span>{{ __('Payment Methods') }}</span>
                        <span class="right-arrow">
                            <i data-lucide="chevron-down"></i>
                        </span>
                    </a>
                    <ul class="dropdown-items">
                        @can('automatic-gateway-manage')
                            <li class="{{ isActive('admin.payment.method.list', 'auto') }}">
                                <a href="{{ route('admin.payment.method.list', 'auto') }}"><i
                                        data-lucide="workflow"></i>{{ __('Automatic Methods') }}
                                </a>
                            </li>
                        @endcan

                        @can('manual-gateway-manage')
                            <li class="{{ isActive('admin.payment.method.list', 'manual') }}">
                                <a href="{{ route('admin.payment.method.list', 'manual') }}">
                                    <i data-lucide="compass"></i>{{ __('Manual Methods') }}
                                </a>
                            </li>
                        @endcan
                    </ul>
                </li>
            @endcanany



            {{-- ************************************************************* Site Essentials ********************************************************* --}}
            @canany(['landing-page-manage', 'page-manage', 'footer-manage', 'navigation-manage', 'custom-css'])
                <li class="side-nav-item category-title">
                    <span>{{ __('Appearance & Pages') }}</span>
                </li>

                {{-- ************************************************************* Site Settings ********************************************************* --}}
                @canany(['site-setting', 'email-setting', 'plugin-setting', 'page-manage', 'language-setting',
                    'sms-setting', 'push-notification-setting', 'notification-tune-setting', 'site-setting', 'email-setting',
                    'plugin-setting', 'page-manage', 'language-setting', 'sms-setting', 'push-notification-setting',
                    'notification-tune-setting'])
                    @canany(['site-setting', 'email-setting', 'plugin-setting', 'page-manage', 'language-setting',
                        'sms-setting', 'push-notification-setting', 'notification-tune-setting'])
                        <li
                            class="side-nav-item side-nav-dropdown {{ isActive(['admin.settings*', 'admin.language*', 'admin.page.setting']) }}">
                            <a href="javascript:void(0);" class="dropdown-link"><i data-lucide="settings"></i>
                                <span>{{ __('Settings') }}</span><span class="right-arrow"><i
                                        data-lucide="chevron-down"></i></span></a>
                            <ul class="dropdown-items">
                                @can('site-setting')
                                    <li class="{{ isActive('admin.settings.site') }}">
                                        <a href="{{ route('admin.settings.site') }}"><i
                                                data-lucide="settings-2"></i>{{ __('Site Settings') }}</a>
                                    </li>
                                @endcan
                                @can('email-setting')
                                    <li class="{{ isActive('admin.settings.mail') }}">
                                        <a href="{{ route('admin.settings.mail') }}"><i
                                                data-lucide="inbox"></i>{{ __('Email Settings') }}</a>
                                    </li>
                                @endcan
                                @can('site-setting')
                                    <li class="{{ isActive('admin.settings.seo.meta') }}">
                                        <a href="{{ route('admin.settings.seo.meta') }}"><i
                                                data-lucide="search-code"></i>{{ __('SEO Meta Settings') }}</a>
                                    </li>
                                @endcan
                                @can('language-setting')
                                    <li class="{{ isActive('admin.language*') }}">
                                        <a href="{{ route('admin.language.index') }}"><i
                                                data-lucide="languages"></i><span>{{ __('Language Settings') }}</span></a>
                                    </li>
                                @endcan

                                @can('page-manage')
                                    <li class="side-nav-item {{ isActive('admin.page.setting') }}">
                                        <a href="{{ route('admin.page.setting') }}"><i
                                                data-lucide="layout"></i><span>{{ __('Page Settings') }}</span></a>
                                    </li>
                                @endcan

                                @can('plugin-setting')
                                    <li class="{{ isActive('admin.settings.plugin', 'system') }}">
                                        <a href="{{ route('admin.settings.plugin', 'system') }}"><i
                                                data-lucide="toy-brick"></i>{{ __('Plugin Settings') }}</a>
                                    </li>
                                @endcan

                            </ul>
                        </li>
                    @endcanany
                @endcanany

                @can('landing-page-manage')
                    {{-- site theme Management --}}
                    <li class="side-nav-item side-nav-dropdown  {{ isActive(['admin.theme*', 'admin.custom-css']) }}">
                        <a href="javascript:void(0);" class="dropdown-link"><i
                                data-lucide="palette"></i><span>{{ __('Appearance') }}</span><span class="right-arrow"><i
                                    data-lucide="chevron-down"></i></span>
                        </a>
                        <ul class="dropdown-items">
                            <li class="{{ isActive('admin.theme.site') }}">
                                <a href="{{ route('admin.theme.site') }}"><i
                                        data-lucide="roller-coaster"></i>{{ __('Site Theme') }}</a>
                            </li>
                            <li class="{{ isActive('admin.theme.dynamic-landing') }}">
                                <a href="{{ route('admin.theme.dynamic-landing') }}"><i
                                        data-lucide="warehouse"></i>{{ __('Dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Landing Theme') }}</a>
                            </li>

                            @can('custom-css')
                                <li class="side-nav-item {{ isActive('admin.custom-css') }}">
                                    <a href="{{ route('admin.custom-css') }}"><i
                                            data-lucide="braces"></i><span>{{ __('Custom CSS') }}</span></a>
                                </li>
                            @endcan
                        </ul>
                    </li>
                    {{-- end site theme Management --}}

                    <li
                        class="side-nav-item side-nav-dropdown  {{ isActive(['admin.page.section.section*', 'admin.page.section.management*', 'admin.footer-content']) }}">
                        <a href="javascript:void(0);" class="dropdown-link"><i
                                data-lucide="home"></i><span>{{ __('Landing Page') }}</span><span class="right-arrow"><i
                                    data-lucide="chevron-down"></i></span></a>
                        <ul class="dropdown-items">
                            @can('page-manage')
                                <li class="side-nav-item {{ isActive('admin.page.section.management*') }}">
                                    <a href="{{ route('admin.page.section.management') }}"><i
                                            data-lucide="list-end"></i><span>{{ __('Section Management') }}</span></a>
                                </li>
                            @endcan
                            @foreach ($landingSections as $section)
                                <li class="@if (request()->is('admin/page/section/' . $section->code)) active @endif">
                                    <a href="{{ route('admin.page.section.section', $section->code) }}"><i
                                            data-lucide="egg"></i>{{ $section->name }}</a>
                                </li>
                            @endforeach
                            @can('footer-manage')
                                <li class="side-nav-item {{ isActive('admin.footer-content') }}">
                                    <a href="{{ route('admin.footer-content') }}"><i
                                            data-lucide="list-end"></i><span>{{ __('Footer Contents') }}</span></a>
                                </li>
                            @endcan
                        </ul>
                    </li>
                @endcan

                @can('page-manage')
                    <li
                        class="side-nav-item side-nav-dropdown {{ isActive(['admin.page.edit*', 'admin.page.create', 'admin.page.blog*']) }}">
                        <a href="javascript:void(0);" class="dropdown-link"><i
                                data-lucide="layout-grid"></i><span>{{ __('Pages') }}</span><span class="right-arrow"><i
                                    data-lucide="chevron-down"></i></span></a>
                        <ul class="dropdown-items">
                            @foreach ($pages as $page)
                                <li class="@if (request()->is('admin/page/edit/' . $page->code)) active @endif">
                                    <a href="{{ route('admin.page.edit', $page->code) }}"><i
                                            data-lucide="egg"></i>{{ $page->title }}</a>
                                </li>
                            @endforeach
                            <li class="{{ isActive('admin.page.create') }}">
                                <a href="{{ route('admin.page.create') }}"><i
                                        data-lucide="egg"></i>{{ __('Add New Page') }}</a>
                            </li>
                        </ul>
                    </li>
                @endcan
                @can('navigation-manage')
                    <li
                        class="side-nav-item {{ isActive(['admin.navigation.*', 'admin.dashboard.navigation.*'], classForArr: 'active') }}">
                        <a href="{{ route('admin.navigation.menu') }}"><i
                                data-lucide="menu"></i><span>{{ __('Site Navigations') }}</span></a>
                    </li>
                @endcan

            @endcanany

            @canany(['subscriber-list', 'subscriber-mail-send'])
                <li class="side-nav-item {{ isActive('admin.subscriber') }}">
                    <a href="{{ route('admin.subscriber') }}"><i
                            data-lucide="mail-open"></i><span>{{ __('All Subscribers') }}</span></a>
                </li>
            @endcanany

            @canany(['clear-cache', 'application-details'])
                <li class="side-nav-item category-title">
                    <span>{{ __('System') }}</span>
                </li>
                <li
                    class="side-nav-item side-nav-dropdown {{ isActive(['admin.clear-cache', 'admin.application-info']) }}">
                    <a href="javascript:void(0);" class="dropdown-link">
                        <i data-lucide="power"></i><span>{{ __('System') }}</span>
                        <span class="right-arrow"><i data-lucide="chevron-down"></i></span>
                    </a>
                    <ul class="dropdown-items">
                        @can('clear-cache')
                            <li class="{{ isActive('admin.clear-cache') }}">
                                <a href="{{ route('admin.clear-cache') }}"><i
                                        data-lucide="trash-2"></i><span>{{ __('Clear Cache') }}</span></a>
                            </li>
                        @endcan
                        @can('application-details')
                            <li class="{{ isActive('admin.application-info') }}">
                                <a href="{{ route('admin.application-info') }}">
                                    <i data-lucide="app-window"></i>
                                    <span>{{ __('Application Details') }}</span>
                                    <span class="badge yellow-color">{{ config('app.version') }}</span>
                                </a>
                            </li>
                        @endcan
                    </ul>
                </li>
            @endcanany
        </ul>
    </div>
</div>
