<nav id="sidebar" class="
    {{-- {{ request()->is('billing-create') ? 'active' : '' }}
    {{ request()->is('billing-edit/*') ? 'active' : '' }}
    {{ request()->is('get-billing-product-data') ? 'active' : '' }}
    {{ request()->is('add-billing-payment') ? 'active' : '' }}
    {{ request()->is('get-bill-payment-invoice/*') ? 'active' : '' }}
    {{ request()->is('client-profile/*') ? 'active' : '' }}
    {{ request()->is('expense-receipt/create') ? 'active' : '' }}
    {{ request()->is('supplier-profile/*') ? 'active' : '' }}
    {{ request()->is('purchase/create') ? 'active' : '' }}
    {{ request()->is('purchase-edit/*') ? 'active' : '' }}
    {{ request()->is('sell/create') ? 'active' : '' }}
    {{ request()->is('sell-edit/*') ? 'active' : '' }} --}}
">
    <div class="sidebar-header">
        <h3>
            @php
            //To get logo...
            $softLogo = App\Models\Logo::getSoftwareLogo();
            @endphp

            @if(isset($softLogo) && $softLogo->logo_image != null)
            <img class="custom-sidebar-logo" src="{{ asset('backend/uploads/logoImg/'.$softLogo->logo_image) }}"
                class="img-fluid" />
            @else
            <img src="{{asset('logo_img/default/')}}/logo.png" class="img-fluid" />
            @endif
        </h3>
    </div>

    <ul class="list-unstyled components custom-sidebar-menu-icon">

        <li class="active">
            <a href="{{route('admin.dashboard')}}" class="dashboard
            {{ request()->is('admin/dashboard') ? 'custom-sidebar-menu-active' : '' }}
            ">
                <i class="material-symbols-outlined">dashboard</i><span>Dashboard</span>
            </a>
        </li>
       
        @if(Auth::user()->can('bill-generate-list'))
        <li class="active">
            <a href="{{route('bill-generate.index')}}" class="dashboard
            {{ request()->is('bill-generate') ? 'custom-sidebar-menu-active' : '' }}
            {{ request()->is('bill-generate-details/*') ? 'custom-sidebar-menu-active' : '' }}
            {{ request()->is('shop-payment-invoice/*') ? 'custom-sidebar-menu-active' : '' }}
            ">
                <i class="material-symbols-outlined">calculate</i><span>Bill Generate</span>
            </a>
        </li>
        @endif

        @if(Auth::user()->can('shop-list') || Auth::user()->can('shop-create'))
        <li class="active">
            <a href="{{route('shop.index')}}" class="dashboard
                {{ request()->is('shop') ? 'custom-sidebar-menu-active' : '' }}
                {{ request()->is('shop-profile/*') ? 'custom-sidebar-menu-active' : '' }}
                {{ request()->is('shop-owner/*') ? 'custom-sidebar-menu-active' : '' }}
                ">
                <i class="material-symbols-outlined">store</i><span>Shop</span>
            </a>
        </li>
        @endif
        
        <div class="small-screen navbar-display">
            @if(Auth::user()->can('floor-list') || Auth::user()->can('business-type-list')
            || Auth::user()->can('service-charge-list'))
            <li class="dropdown">
                <a href="javascript:void(0)" data-bs-target="#homeSubmenu0" data-bs-toggle="collapse" aria-expanded="false"
                    class="dropdown-toggle
                        {{ request()->is('floor') ? 'custom-sidebar-menu-active' : '' }}
                        {{ request()->is('business-type') ? 'custom-sidebar-menu-active' : '' }}
                        {{ request()->is('service-charge') ? 'custom-sidebar-menu-active' : '' }}
                        " onclick="sidebarCollapseMenu(4)">
                    <i class="material-symbols-outlined">devices_other</i><span>Others</span></a>
                <ul class="collapse list-unstyled menu
                        {{ request()->is('floor') ? 'custom-sidebar-open' : '' }}
                        {{ request()->is('business-type') ? 'custom-sidebar-open' : '' }}
                        {{ request()->is('service-charge') ? 'custom-sidebar-open' : '' }}
                    " id="sidebar_collapse_4">

                    @if(Auth::user()->can('floor-list'))
                    <li class="ms-2
                        {{ request()->is('floor') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('floor.index') }}"><i class="fa-regular fa-circle sidebar-li"></i>
                            Floor</a>
                    </li>
                    @endif
                    
                    @if(Auth::user()->can('business-type-list'))
                    <li class="ms-2
                        {{ request()->is('business-type') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('business-type.index') }}"><i class="fa-regular fa-circle sidebar-li"></i>
                            Business Type</a>
                    </li>
                    @endif
                    
                    @if(Auth::user()->can('service-charge-list'))
                    <li class="ms-2
                        {{ request()->is('service-charge') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('service-charge.index') }}"><i class="fa-regular fa-circle sidebar-li"></i>
                            Service Charge</a>
                    </li>
                    @endif
        
                </ul>
            </li>
            @endif
        </div>

        <div class="small-screen navbar-display">
            @if(Auth::user()->can('expense-category-list') || Auth::user()->can('expense-category-create')
            || Auth::user()->can('expense-list') || Auth::user()->can('expense-create')
            || Auth::user()->can('expense-receipt-list') || Auth::user()->can('expense-receipt-create'))
            <li class="dropdown">
                <a href="javascript:void(0)" data-bs-target="#homeSubmenu0" data-bs-toggle="collapse"
                    aria-expanded="false" class="dropdown-toggle
                    {{ request()->is('expense-category') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('active-expense-category-list') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('inactive-expense-category-list') ? 'custom-sidebar-menu-active' : '' }}

                    {{ request()->is('expense') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('active-expense-list') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('inactive-expense-list') ? 'custom-sidebar-menu-active' : '' }}
                    
                    {{ request()->is('expense-receipt') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('expense-receipt/create') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('expense-receipt/*/edit') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('save-all-expense-receipt') ? 'custom-sidebar-menu-active' : '' }}
                    " onclick="sidebarCollapseMenu(1)">
                    <i class="material-symbols-outlined">local_mall</i><span>Expense</span></a>
                <ul class="collapse list-unstyled menu
                    {{ request()->is('expense-category') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('active-expense-category-list') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('inactive-expense-category-list') ? 'custom-sidebar-open' : '' }}

                    {{ request()->is('expense') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('active-expense-list') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('inactive-expense-list') ? 'custom-sidebar-open' : '' }}
                    
                    {{ request()->is('expense-receipt') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('expense-receipt/create') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('expense-receipt/*/edit') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('save-all-expense-receipt') ? 'custom-sidebar-open' : '' }}
                    " id="sidebar_collapse_1">

                    @if(Auth::user()->can('expense-category-list'))
                    <li class="ms-2
                        {{ request()->is('expense-category') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('active-expense-category-list') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('inactive-expense-category-list') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('expense-category.index') }}"><i class="fa-regular fa-circle sidebar-li"></i>
                            Category List</a>
                    </li>
                    @endif

                    @if(Auth::user()->can('expense-list'))
                    <li class="ms-2
                        {{ request()->is('expense') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('active-expense-list') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('inactive-expense-list') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('expense.index') }}"><i class="fa-regular fa-circle sidebar-li"></i> Expense
                            List</a>
                    </li>
                    @endif
                    
                    @if(Auth::user()->can('expense-receipt-list'))
                    <li class="ms-2
                        {{ request()->is('expense-receipt') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('expense-receipt/create') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('expense-receipt/*/edit') ? 'custom-sidebar-submenu-active' : '' }}
                        {{ request()->is('save-all-expense-receipt') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('expense-receipt.index') }}"><i class="fa-regular fa-circle sidebar-li"></i> Expense Receipt</a>
                    </li>
                    @endif

                </ul>
            </li>
            @endif
        </div>

        <div class="small-screen navbar-display">
            @if(Auth::user()->can('expense-daily-report-access') || Auth::user()->can('expense-monthly-report-access') 
            || Auth::user()->can('expense-between-report-access') || Auth::user()->can('shop-invoice-report-access'))
            <li class="dropdown">
                <a href="javascript:void(0)" data-bs-target="#homeSubmenu0" data-bs-toggle="collapse" aria-expanded="false"
                    class="dropdown-toggle
                    {{ request()->is('expense-daily-report') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('expense-monthly-report') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('expense-between-report') ? 'custom-sidebar-menu-active' : '' }}

                    {{ request()->is('shop-wise-invoice-report') ? 'custom-sidebar-menu-active' : '' }}
                    " onclick="sidebarCollapseMenu(11)">
                    <i class="material-symbols-outlined">print_add</i><span> Reports</span>
                </a>
                <ul class="collapse list-unstyled menu 
                    {{ request()->is('expense-daily-report') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('expense-monthly-report') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('expense-between-report') ? 'custom-sidebar-open' : '' }}

                    {{ request()->is('shop-wise-invoice-report') ? 'custom-sidebar-open' : '' }}
                    " id="sidebar_collapse_11">

                     @if (Auth::user()->can('expense-daily-report-access'))
                    <li class="ms-2
                        {{ request()->is('expense-daily-report') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('expense-daily-report') }}"><i class="fa-regular fa-circle sidebar-li"></i> Expense Daily</a>
                    </li>
                    @endif
                    
                    @if (Auth::user()->can('expense-monthly-report-access'))
                    <li class="ms-2
                        {{ request()->is('expense-monthly-report') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('expense-monthly-report') }}"><i class="fa-regular fa-circle sidebar-li"></i> Expense Monthly</a>
                    </li>
                    @endif
                    
                    @if (Auth::user()->can('expense-between-report-access'))
                    <li class="ms-2
                        {{ request()->is('expense-between-report') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('expense-between-report') }}"><i class="fa-regular fa-circle sidebar-li"></i> Expense Between</a>
                    </li>
                    @endif
                    
                    @if (Auth::user()->can('shop-invoice-report-access'))
                    <li class="ms-2
                        {{ request()->is('shop-wise-invoice-report') ? 'custom-sidebar-submenu-active' : '' }}
                        ">
                        <a href="{{ route('shop-wise-invoice-report') }}"><i class="fa-regular fa-circle sidebar-li"></i> Shop Wise Invoice</a>
                    </li>
                    @endif
        
                </ul>
            </li>
            @endif
        
        </div>
        
        <div class="small-screen navbar-display">
            @if(Auth::user()->can('user-list') || Auth::user()->can('role-list')
            || Auth::user()->can('general-setting-access'))
            <li class="dropdown">
                <a href="javascript:void(0)" data-bs-target="#homeSubmenu0" data-bs-toggle="collapse"
                    aria-expanded="false" class="dropdown-toggle
                    {{ request()->is('setting') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('roles') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('roles/create') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('roles/*/edit') ? 'custom-sidebar-menu-active' : '' }}
                    {{ request()->is('users') ? 'custom-sidebar-menu-active' : '' }}
                    " onclick="sidebarCollapseMenu(3)">
                    <i class="material-symbols-outlined">settings</i><span> Settings</span></span></a>
                <ul class="collapse list-unstyled menu
                    {{ request()->is('setting') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('roles') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('roles/create') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('roles/*/edit') ? 'custom-sidebar-open' : '' }}
                    {{ request()->is('users') ? 'custom-sidebar-open' : '' }}
                " id="sidebar_collapse_3">
                    
                    @if (Auth::user()->can('general-setting-access'))
                    <li class="ms-2
                    {{ request()->is('setting') ? 'custom-sidebar-submenu-active' : '' }}
                    ">
                        <a href="{{ route('setting') }}"><i class="fa-regular fa-circle sidebar-li"></i> General
                            Setting</a>
                    </li>
                    @endif

                    @if(Auth::user()->can('role-list') || Auth::user()->can('role-create') ||
                    Auth::user()->can('role-edit') || Auth::user()->can('role-delete'))
                    <li class="ms-2
                    {{ request()->is('roles') ? 'custom-sidebar-submenu-active' : '' }}
                    {{ request()->is('roles/create') ? 'custom-sidebar-submenu-active' : '' }}
                    {{ request()->is('roles/*/edit') ? 'custom-sidebar-submenu-active' : '' }}
                    ">
                        <a href="{{ route('roles.index') }}"><i class="fa-regular fa-circle sidebar-li"></i> Role </a>
                    </li>
                    @endif

                    @if(Auth::user()->can('user-list'))
                    <li class="ms-2
                    {{ request()->is('users') ? 'custom-sidebar-submenu-active' : '' }}
                    ">
                        <a href="{{ route('users.index') }}"><i class="fa-regular fa-circle sidebar-li"></i> User </a>
                    </li>
                    @endif
                </ul>
            </li>
            @endif
        </div>

    </ul>
</nav>