@php
    $menu = [
        ['route' => 'admin.dashboard', 'active' => 'admin.dashboard', 'label' => 'Dashboard', 'icon' => 'ri-dashboard-2-line'],
        ['route' => 'admin.customers.index', 'active' => 'admin.customers.*', 'label' => 'Clients / Customers', 'icon' => 'ri-user-3-line'],
        ['route' => 'admin.vendors.index', 'active' => 'admin.vendors.*', 'label' => 'Vendors', 'icon' => 'ri-store-2-line'],
        ['route' => 'admin.items.index', 'active' => 'admin.items.*', 'label' => 'Items', 'icon' => 'ri-stack-line'],
        ['route' => 'admin.invoices.index', 'active' => 'admin.invoices.*', 'label' => 'Invoices', 'icon' => 'ri-file-list-3-line'],
        ['route' => 'admin.quotations.index', 'active' => 'admin.quotations.*', 'label' => 'Quotes & Proformas', 'icon' => 'ri-file-copy-2-line'],
        ['route' => 'admin.delivery-challans.index', 'active' => 'admin.delivery-challans.*', 'label' => 'Delivery Challans', 'icon' => 'ri-truck-line'],
        ['route' => 'admin.credit-notes.index', 'active' => 'admin.credit-notes.*', 'label' => 'Credit Notes', 'icon' => 'ri-file-reduce-line'],
        ['route' => 'admin.debit-notes.index', 'active' => 'admin.debit-notes.*', 'label' => 'Debit Notes', 'icon' => 'ri-file-add-line'],
        ['route' => 'admin.purchase-orders.index', 'active' => 'admin.purchase-orders.*', 'label' => 'Purchase Orders', 'icon' => 'ri-shopping-cart-line'],
        ['route' => 'admin.purchase-bills.index', 'active' => 'admin.purchase-bills.*', 'label' => 'Purchase Bills', 'icon' => 'ri-shopping-bag-line'],
        ['route' => 'admin.expenses.index', 'active' => 'admin.expenses.*', 'label' => 'Expenses', 'icon' => 'ri-wallet-3-line'],
        ['route' => 'admin.payments.index', 'active' => 'admin.payments.*', 'label' => 'Payments', 'icon' => 'ri-money-dollar-circle-line'],
        ['route' => 'admin.reports.gstr1', 'active' => 'admin.reports*', 'label' => 'Reports', 'icon' => 'ri-bar-chart-box-line'],
        ['route' => 'admin.accounting.index', 'active' => 'admin.accounting*', 'label' => 'Accounting', 'icon' => 'ri-calculator-line'],
        ['route' => 'admin.preferences.profile', 'active' => 'admin.preferences.profile', 'label' => 'Company', 'icon' => 'ri-building-2-line'],
        ['route' => 'admin.preferences.general', 'active' => 'admin.preferences.general', 'label' => 'Preferences', 'icon' => 'ri-settings-3-line'],
    ];
@endphp

<div class="app-menu navbar-menu">
    <div class="navbar-brand-box">
        <a href="{{ route('admin.dashboard') }}" class="logo logo-dark">
            <span class="logo-sm">
                <img src="{{ theme_asset('images/logo-sm.png') }}" alt="" height="22">
            </span>
            <span class="logo-lg">
                <img src="{{ theme_asset('images/logo-dark.png') }}" alt="" height="17">
            </span>
        </a>
        <a href="{{ route('admin.dashboard') }}" class="logo logo-light">
            <span class="logo-sm">
                <img src="{{ theme_asset('images/logo-sm.png') }}" alt="" height="22">
            </span>
            <span class="logo-lg">
                <img src="{{ theme_asset('images/logo-light.png') }}" alt="" height="17">
            </span>
        </a>
        <button type="button" class="btn btn-sm p-0 fs-20 header-item float-end btn-vertical-sm-hover" id="vertical-hover">
            <i class="ri-record-circle-line"></i>
        </button>
    </div>

    <div id="two-column-menu" class="d-none" aria-hidden="true"></div>

    <div id="scrollbar">
        <div class="container-fluid">
            <ul class="navbar-nav" id="navbar-nav">
                <li class="menu-title"><span>Menu</span></li>
                @foreach($menu as $item)
                    <li class="nav-item">
                        <a class="nav-link menu-link {{ request()->routeIs($item['active']) ? 'active' : '' }}"
                           href="{{ route($item['route']) }}">
                            <i class="{{ $item['icon'] }}"></i>
                            <span>{{ $item['label'] }}</span>
                        </a>
                    </li>
                @endforeach
            </ul>
        </div>
    </div>

    <div class="sidebar-background"></div>
</div>
