<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
    <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ route('dashboard') }}">
        <div class="sidebar-brand-icon rotate-n-15">
            <i class="fas fa-laugh-wink"></i>
        </div>
        <div class="sidebar-brand-text mx-3">{{ auth()->user()->first_name }}  {{ auth()->user()->last_name }}</div>
    </a>
    <hr class="sidebar-divider my-0">
    <li class="nav-item {{ Request::is('dashboard*') ? 'active' : '' }}">
        <a class="nav-link" href="{{ route('dashboard') }}">
            <i class="fas fa-fw fa-tachometer-alt"></i>
            <span>Dashboard</span>
        </a>
    </li>
    <hr class="sidebar-divider">
    @canany(['role-create', 'role-edit', 'role-view', 'role-delete', 'permission-create', 'permission-edit', 'permission-view', 'permission-delete', 'access-edit', 'access-view'])
        <!-- <div class="sidebar-heading">
            Access Control
        </div> -->
        <li class="nav-item {{ (Request::is('role*') || Request::is('permission*') || Request::is('access_permission*')) ? 'active' : '' }}">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
                aria-expanded="false" aria-controls="collapseTwo">
                <i class="fas fa-fw fa-cog"></i>
                <span> Access Control</span>
            </a>
            <div id="collapseTwo" class="collapse {{ (Request::is('role*') || Request::is('permission*') || Request::is('access_permission*')) ? 'show' : '' }}" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    @canany(['role-create', 'role-edit', 'role-view', 'role-delete'])
                        <a class="collapse-item {{ Request::is('role*') ? 'active' : '' }}" href="{{ route('role') }}">Roles</a>
                    @endcanany
                    @canany(['permission-create', 'permission-edit', 'permission-view', 'permission-delete'])
                        <a class="collapse-item {{ Request::is('permission*') ? 'active' : '' }}" href="{{ route('permission') }}">Permission</a>
                    @endcanany
                    @canany(['access-edit', 'access-view'])
                        <!-- Request::is('access_permission*') ? 'active' : ''  -->
                        <!-- route('access_permission') -->

                        <!-- <a class="collapse-item " href="">Access</a> -->
                    @endcanany
                    <a class="collapse-item {{ Request::is('settings*') ? 'active' : '' }}" href="{{ route('settings') }}">settings</a>
                </div>
            </div>
        </li>
    @endcanany
<!-- Access Control -->
<!-- User -->
    @canany(['user-create','user-edit','user-view','user-delete'])
    <li class="nav-item {{ Request::is('user*') ? 'active' : '' }}">
        <a class="nav-link" href="{{ route('user') }}">
            <i class="fa fa-users"></i>
            <span>Users</span>
        </a>
    </li>
    @endcanany
<!-- User -->
<!-- OBF -->
    @canany(['obf-create', 'obf-edit', 'obf-view', 'obf-delete', 'obf_approval-create', 'obf_approval-edit', 'obf_approval-view', 'obf_approval-delete', 'obf-rtoview', 'obf-insuranceview', 'obf-fasttagview'])
        <li class="nav-item {{ (Request::is('obf*') || Request::is('obf_approval*') || Request::is('cash_receipt*')) ? 'active' : '' }}">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseOne"
                aria-expanded="false" aria-controls="collapseOne">
                <i class="fa fa-file" aria-hidden="true"></i>
                <span>OBF</span>
            </a>
            <div id="collapseOne" class="collapse {{ (Request::is('obf*') || Request::is('obf_approval*') || Request::is('cash_receipt*')) ? 'show' : '' }}" aria-labelledby="headingOne" data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    @canany(['obf-create', 'obf-edit', 'obf-view', 'obf-delete','obf-fasttagview','obf-rtoview','obf-insuranceview'])
                        <a class="collapse-item {{ Request::is('obf*') ? 'active' : '' }}" href="{{ route('obf') }}">OBF</a>
                    @endcanany
                    @canany(['approval-create' ,'approval-edit' ,'approval-view' ,'approval-delete'])
                        <a class="collapse-item {{ Request::is('obf_approval*') ? 'active' : '' }}" href="{{ route('obf_approval') }}">OBF Approval</a>
                    @endcanany
                    @canany(['cash_receipt-create','cash_receipt-edit','cash_receipt-view','cash_receipt-delete'])
                        <a class="collapse-item {{ Request::is('cash_receipt*') ? 'active' : '' }}" href="{{ route('cash_receipt') }}">Cash Receipt</a>
                    @endcanany
                    @canany(['account_approval-create','account_approval-edit','account_approval-view','account_approval-delete'])
                        <a class="collapse-item {{ Request::is('account_approval*') ? 'active' : '' }}" href="{{ route('account_approval') }}">Account Approval</a>
                    @endcanany
                </div>
            </div>
        </li>
    @endcanany
<!-- OBF -->

<!-- Masters -->
@canany(['role-create', 'role-edit', 'role-view', 'role-delete', 'permission-create', 'permission-edit', 'permission-view', 'permission-delete', 'access-edit', 'access-view'])        <li class="nav-item {{ (Request::is('products*') || Request::is('tax*') || Request::is('insurance*') || Request::is('extand_warranties*') || Request::is('fasttag*') || Request::is('finance.*') || Request::is('branches*') || Request::is('department*') ||  Request::is('lead*') ||  Request::is('accessory*')) ? 'active' : '' }}">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseThree"
                aria-expanded="false" aria-controls="collapseThree">
                <i class="fas fa-asterisk"></i>
                <span>Masters</span>
            </a>
            <div id="collapseThree" class="collapse {{ (Request::is('products*') || Request::is('tax*') || Request::is('insurance*') || Request::is('extand_warranties*') || Request::is('fasttag*') || Request::is('finance.*') || Request::is('branches*') || Request::is('department*') ||  Request::is('lead*') ||  Request::is('accessory*')) ? 'show' : '' }}" aria-labelledby="headingOne" data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    @canany(['products-create','products-edit','products-view','products-delete'])
                        <a class="collapse-item {{ Request::is('products*') ? 'active' : '' }}" href="{{ route('products') }}">Car Master</a>
                    @endcanany
                    @canany(['taxes-create','taxes-edit','taxes-view','taxes-delete'])

                        {{--

                        <a class="collapse-item {{ Request::is('tax*') ? 'active' : '' }}" href="{{ route('tax') }}">Taxes</a>

                        --}}
                    @endcanany
                    @canany(['insurance-create','insurance-edit','insurance-view','insurance-delete'])
                        <a class="collapse-item {{ Request::is('insurance*') ? 'active' : '' }}" href="{{ route('insurance') }}">Insurance</a>
                    @endcanany
                    @canany(['extand_warranties-create','extand_warranties-edit','extand_warranties-view','extand_warranties-delete'])
                        <a class="collapse-item {{ Request::is('extand_warranties*') ? 'active' : '' }}" href="{{ route('extand_warranties') }}">Extended Warranty</a>
                    @endcanany
                    @canany(['fasttags-create','fasttags-edit','fasttags-view','fasttags-delete'])
                        <a class="collapse-item {{ Request::is('fasttag*') ? 'active' : '' }}" href="{{ route('fasttag') }}">FastTag</a>
                    @endcanany
                    @canany(['finance-create','finance-edit','finance-view','finance-delete'])
                        <a class="collapse-item {{ Request::is('finance*') ? 'active' : '' }}" href="{{ route('finance') }}">Finance</a>
                    @endcanany
                    @canany(['branches-create','branches-edit','branches-view','branches-delete'])
                        <a class="collapse-item {{ Request::is('branches*') ? 'active' : '' }}" href="{{ route('branches') }}">Branches</a>
                    @endcanany
                    @canany(['department-create','department-edit','department-view','department-delete'])
                        <a class="collapse-item {{ Request::is('department*') ? 'active' : '' }}" href="{{ route('department') }}">Department</a>
                    @endcanany
                    @canany(['rsa-create','rsa-edit','rsa-view','rsa-delete'])
                        <a class="collapse-item {{ Request::is('rsa*') ? 'active' : '' }}" href="{{ route('rsa') }}">RSA Master</a>
                    @endcanany
                    @canany(['lead-create','lead-edit','lead-view','lead-delete'])
                        <a class="collapse-item {{ Request::is('lead*') ? 'active' : '' }}" href="{{ route('lead') }}">Lead Source</a>
                    @endcanany
                    @canany(['sub_lead-create','sub_lead-edit','sub_lead-view','sub_lead-delete'])
                        <a class="collapse-item {{ Request::is('sub_lead*') ? 'active' : '' }}" href="{{ route('sub_lead') }}">Sub Lead Source</a>
                    @endcanany
                    @canany(['accessories-create','accessories-edit','accessories-view','accessories-delete'])
                        <a class="collapse-item {{ Request::is('accessory*') ? 'active' : '' }}" href="{{ route('accessory') }}">Accessory</a>
                    @endcanany
                    <a class="collapse-item {{ Request::is('occupation*') ? 'active' : '' }}" href="{{ route('occupation') }}">Occupation</a>
                    <a class="collapse-item {{ Request::is('colortone*') ? 'active' : '' }}" href="{{ route('colortone') }}">Color tone</a>
                    <a class="collapse-item {{ Request::is('car_model*') ? 'active' : '' }}" href="{{ route('car_model') }}">Car Model</a>
                    <a class="collapse-item {{ Request::is('fuel_type*') ? 'active' : '' }}" href="{{ route('fule_type') }}">Fuel Type</a>
                    <a class="collapse-item {{ Request::is('transmission*') ? 'active' : '' }}" href="{{ route('transmission') }}">Transmission</a>
                    <a class="collapse-item {{ Request::is('interior*') ? 'active' : '' }}" href="{{ route('interior') }}">Interior Color</a>
                    <a class="collapse-item {{ Request::is('exterior*') ? 'active' : '' }}" href="{{ route('exterior') }}">Exterior Color</a>
                    <a class="collapse-item {{ Request::is('car_varient*') ? 'active' : '' }}" href="{{ route('car_varient') }}">Car Varient</a>
                    <a class="collapse-item {{ Request::is('team_master*') ? 'active' : '' }}" href="{{ route('team_master') }}">Team Master</a>
                    <a class="collapse-item {{ Request::is('mcp*') ? 'active' : '' }}" href="{{ route('mcp') }}">My Convinience Program</a>
                    <a class="collapse-item {{ Request::is('other_master_1*') ? 'active' : '' }}" href="{{ route('other_master_1') }}">Other1 Master </a>
                    <a class="collapse-item {{ Request::is('other_master_2*') ? 'active' : '' }}" href="{{ route('other_master_2') }}">Other2 Master </a>
                    <a class="collapse-item {{ Request::is('tex_master*') ? 'active' : '' }}" href="{{ route('tex_master') }}">Tax Master </a>
                    <a class="collapse-item {{ Request::is('customer_type_master*') ? 'active' : '' }}" href="{{ route('customer_type_master') }}">Customer Type Master </a>
                   
                    
                </div>
            </div>
        </li>
    @endcanany
<!-- Masters -->

<!-- Order -->
    @canany(['orders-create','orders-edit','orders-view','orders-delete'])
        <li class="nav-item {{ Request::is('order*') ? 'active' : '' }}">
            <a class="nav-link" href="{{ route('order') }}">
                <i class="fa fa-shopping-cart"></i>
                <span>Orders</span>
            </a>
        </li>
    @endcanany
<!-- Order -->

<!-- Transfer -->
    @canany(['transfer-create','transfer-edit','transfer-view','transfer-delete'])
        <li class="nav-item {{ Request::is('transfer*') ? 'active' : '' }}">
            <a class="nav-link" href="{{ route('transfer') }}">
                <i class="fa-solid fa-truck-moving"></i>
                <span>Transfer</span>
            </a>
        </li>
    @endcanany
<!-- Transfer -->

<!-- Inventory -->
    @canany(['inventory-create','inventory-edit','inventory-view','inventory-delete'])
        <li class="nav-item {{ Request::is('inventory*') ? 'active' : '' }}">
            <a class="nav-link" href="{{ route('inventory') }}">
            <i class="fa-solid fa-warehouse"></i>
                <span>Inventory</span>
            </a>
        </li>
    @endcanany
        <li class="nav-item {{ Request::is('pettycash*') ? 'active' : '' }}">
            <a class="nav-link" href="{{ route('pettycash') }}">
            <i class="fa-solid fa-warehouse"></i>
                <span>PettyCash</span>
            </a>
        </li>
    <!-- <li class="nav-item {{ Request::is('stock*') ? 'active' : '' }}">
            <a class="nav-link" href="{{ route('inventorystock') }}">
            <i class="fa-solid fa-warehouse"></i>
                <span>Stock</span>
            </a>
        </li> -->
        
    <li class="nav-item {{ Request::is('pricelist*') ? 'active' : '' }}">
            <a class="nav-link" href="{{ route('pricelist') }}">
            <i class="fa-solid fa-warehouse"></i>
                <span>Pricelist Manager</span>
            </a>
        </li>
<!-- Inventory -->

<!-- Car Exchange -->
@canany(['car_exchange-create', 'car_exchange-edit', 'car_exchange-view', 'car_exchange-delete', 'car_exchange_category-create', 'car_exchange_category-edit', 'car_exchange_category-view', 'car_exchange_category-delete', 'car_exchange_product-create', 'car_exchange_product-edit', 'car_exchange_product-view', 'car_exchange_product-delete'])
        <li class="nav-item {{ (Request::is('car_exchange*') || Request::is('car_exchange_category*') || Request::is('car_exchange_product*')) ? 'active' : '' }}">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseFour"
                aria-expanded="false" aria-controls="collapseFour">
                <i class="fa-solid fa-shuffle"></i>
                <span>Car Exchange</span>
            </a>
            <div id="collapseFour" class="collapse {{ (Request::is('car_exchange*') || Request::is('car_exchange_category*') || Request::is('car_exchange_product*')) ? 'show' : '' }}" aria-labelledby="headingOne" data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    
                    <a class="collapse-item {{ Request::is('car_exchange_category*') ? 'active' : '' }}" href="{{ route('car_exchange_category') }}">Car Exchange Category</a>
                   
                    <a class="collapse-item {{ Request::is('car_exchange_product*') ? 'active' : '' }}" href="{{ route('car_exchange_product') }}">Car Exchange Product</a>
                   
                    <a class="collapse-item {{ Request::is('car_exchange*') ? 'active' : '' }}" href="{{ route('car_exchange') }}">Car Exchange</a>
                    
                </div>
            </div>
        </li>
    @endcanany
<!-- Car Exchange -->
<!-- Asset -->
<li class="nav-item {{ Request::is('asset*') ? 'active' : '' }}">
    <a class="nav-link" href="{{ route('asset') }}">
    <i class="fas fa-th-list"></i>
        <span>Asset</span>
    </a>
</li>
<!-- Asset -->
<!-- Notifications -->
<li class="nav-item {{ Request::is('notifications*') ? 'active' : '' }}">
    <a class="nav-link" href="{{ route('notifications') }}">
    <i class="fas fa-notification"></i>
        <span>Notifications</span>
    </a>
</li>
<!-- Notifications -->
<!-- Insurance  Details-->

<li class="nav-item {{ (Request::is('mature_insurance*') || Request::is('last_month_insurance*') || Request::is('expired_insurance*')) ? 'active' : '' }}">
    <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseSix"
        aria-expanded="false" aria-controls="collapseSix">
        <i class="fa fa-envelope"></i>
        <span>Mature Insurance</span>
    </a>
    <div id="collapseSix" class="collapse {{ (Request::is('mature_insurance*') || Request::is('expired_insurance*') || Request::is('last_month_insurance*')) ? 'show' : '' }}" aria-labelledby="headingOne" data-parent="#accordionSidebar">
        <div class="bg-white py-2 collapse-inner rounded">
            
            <a class="collapse-item {{ Request::is('last_month_insurance*') ? 'active' : '' }}" href="{{ route('last_month_insurance') }}">Last Month Insurance</a>

            <a class="collapse-item {{ Request::is('expired_insurance*') ? 'active' : '' }}" href="{{ route('expired_insurance') }}">Expired Insurance</a>
            
        </div>
    </div>
</li>
<!-- Template Master -->


    

<li class="nav-item {{ Request::is('template_master*') ? 'active' : '' }}">
    <a class="nav-link" href="{{ route('template_master') }}">
    <i class="fas fa-notification"></i>
        <span>Template Master</span>
    </a>
</li>

<!-- Template Master -->
</ul>

