<div id="kt_aside" class="aside" data-kt-drawer="true" data-kt-drawer-name="aside"
    data-kt-drawer-activate="{default: true, lg: false}" data-kt-drawer-overlay="true"
    data-kt-drawer-width="{default:'220px', '300px': '270px'}" data-kt-drawer-direction="start"
    data-kt-drawer-toggle="#kt_aside_mobile_toggle" style="background-color: var(--sidebar-bg-color);">

    <div class="aside-menu flex-column-fluid">
        <div class="hover-scroll-overlay-y my-3 px-4" id="kt_aside_menu_wrapper" data-kt-scroll="true"
            data-kt-scroll-height="auto"
            data-kt-scroll-dependencies="{default: '#kt_aside_toolbar, #kt_aside_footer', lg: '#kt_header, #kt_aside_toolbar, #kt_aside_footer'}"
            data-kt-scroll-wrappers="#kt_aside_menu" data-kt-scroll-offset="5px">
            <div class="menu menu-column menu-rounded menu-state-title-primary menu-state-icon-primary menu-state-bullet-primary menu-arrow-gray-500 fw-semibold"
                id="#kt_aside_menu" data-kt-menu="true" style="font-family: var(--font-family); font-size: var(--menu-font-size);">
                <div class="menu-item mb-1">
                    <a class="menu-link {{ url()->current() == route('admin.index') ? 'active' : '' }}"
                        href="{{ route('admin.index') }}">
                        <span class="menu-icon">
                            <i class="bi bi-grid-1x2-fill fs-3 " style="color: var(--sidebar-text-color);"></i>
                        </span>
                        <span class="menu-title fw-bold">{{ __('translations.dashboard') }}</span>
                    </a>
                </div>

                <div class="menu-item menu-accordion">
                    <div class="menu-content pb-2 pt-3">
                        <span class="menu-section text-muted text-uppercase fs-7 fw-bold">{{ __('translations.management') }}</span>
                    </div>
                </div>

                @permission('roles-list')
                    <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.roles.index') ? 'active' : '' }}"
                            href="{{ route('admin.roles.index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-shield-lock fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.roles') }}</span>
                        </a>
                    </div>
                @endpermission

                @permission('users-list')
                    <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.users.index') ? 'active' : '' }}"
                            href="{{ route('admin.users.index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-people-fill fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.users') }}</span>
                        </a>
                    </div>
                @endpermission

                <div data-kt-menu-trigger="click"
                    class="menu-item menu-accordion {{ url()->current() == route('admin.clients.index') ? 'here hover show' : '' }} mb-1">
                    <span class="menu-link">
                        <span class="menu-icon">
                            <i class="bi bi-person-badge fs-3" style="color: var(--sidebar-text-color);"></i>
                        </span>
                        <span class="menu-title fw-bold">{{ __('translations.clients') }}</span>
                        <span class="menu-arrow"></span>
                    </span>
                    </a>
                    <div class="menu-sub menu-sub-accordion">
                        @permission('clients-list')
                            <div class="menu-item">
                                <a class="menu-link {{ url()->current() == route('admin.clients.index') ? 'active' : '' }}"
                                    href="{{ route('admin.clients.index') }}">
                                    <span class="menu-bullet">
                                        <span class="bullet bullet-dot"></span>
                                    </span>
                                    <span class="menu-title">{{ __('translations.clients-list') }}</span>
                                </a>
                            </div>
                        @endpermission
                        @permission('clients-create')
                            <div class="menu-item">
                                <a class="menu-link {{ url()->current() == route('admin.clients.create') ? 'active' : '' }}"
                                    href="{{ route('admin.clients.create') }}">
                                    <span class="menu-bullet">
                                        <span class="bullet bullet-dot"></span>
                                    </span>
                                    <span class="menu-title">{{ __('translations.clients-create') }}</span>
                                </a>
                            </div>
                        @endpermission
                    </div>
                </div>

                <div data-kt-menu-trigger="click"
                    class="menu-item menu-accordion {{ url()->current() == route('admin.reports.index') ? 'here hover show' : '' }} mb-1">
                    <span class="menu-link">
                        <span class="menu-icon">
                            <i class="bi bi-file-earmark-bar-graph fs-3" style="color: var(--sidebar-text-color);"></i>
                        </span>
                        <span class="menu-title fw-bold">{{ __('translations.reports') }}</span>
                        <span class="menu-arrow"></span>
                    </span>
                    </a>
                    <div class="menu-sub menu-sub-accordion">
                        @permission('reports-examinations')
                            <div class="menu-item">
                                <a class="menu-link {{ url()->current() == route('admin.reports.index') ? 'active' : '' }}"
                                    href="{{ route('admin.reports.index') }}">
                                    <span class="menu-bullet">
                                        <span class="bullet bullet-dot"></span>
                                    </span>
                                    <span class="menu-title">{{ __('translations.examinations-reports') }}</span>
                                </a>
                            </div>
                        @endpermission



                        @permission('reports-clients')
                            <div class="menu-item">
                                <a class="menu-link {{ url()->current() == route('admin.client.all') ? 'active' : '' }}"
                                    href="{{ route('admin.client.all') }}">
                                    <span class="menu-bullet">
                                        <span class="bullet bullet-dot"></span>
                                    </span>
                                    <span class="menu-title">{{ __('translations.reports-clients') }}</span>
                                </a>
                            </div>
                        @endpermission
                    </div>
                </div>

                <div class="menu-item menu-accordion">
                    <div class="menu-content pb-2 pt-3">
                        <span class="menu-section text-muted text-uppercase fs-7 fw-bold">{{ __('translations.operations') }}</span>
                    </div>
                </div>

                @permission('receptions-list')
                    <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.receptions.index') ? 'active' : '' }}"
                            href="{{ route('admin.receptions.index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-journal-check fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.receptions') }}</span>
                        </a>
                    </div>
                @endpermission

                @permission('categories-list')
                    <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.categories.index') ? 'active' : '' }}"
                            href="{{ route('admin.categories.index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-tags-fill fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.categories') }}</span>
                        </a>
                    </div>
                @endpermission

                @permission('products-list')
                    <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.products.index') ? 'active' : '' }}"
                            href="{{ route('admin.products.index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-box-seam fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.products') }}</span>
                        </a>
                    </div>
                @endpermission

                <div class="menu-item menu-accordion">
                    <div class="menu-content pb-2 pt-3">
                        <span class="menu-section text-muted text-uppercase fs-7 fw-bold">{{ __('translations.finance') }}</span>
                    </div>
                </div>


                @permission('invoices-list')
                <div class="menu-item mb-1">
                    <a class="menu-link {{ url()->current() == route('admin.invoices.index') ? 'active' : '' }}"
                        href="{{ route('admin.invoices.index') }}">
                        <span class="menu-icon">
                            <i class="bi bi-receipt fs-3" style="color: var(--sidebar-text-color);"></i>
                        </span>
                        <span class="menu-title fw-bold">{{ __('translations.invoices') }}</span>
                    </a>
                </div>
                @endpermission

                @permission('invoices-return')
                    <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.invoices.return-invoice-index') ? 'active' : '' }}"
                            href="{{ route('admin.invoices.return-invoice-index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-arrow-return-left fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.invoices-return') }}</span>
                        </a>
                    </div>
                @endpermission

                @permission('invoices-resend')
                <div class="menu-item mb-1">
                        <a class="menu-link {{ url()->current() == route('admin.invoices.not-resend-invoice-index') ? 'active' : '' }}"
                            href="{{ route('admin.invoices.not-resend-invoice-index') }}">
                            <span class="menu-icon">
                                <i class="bi bi-send-x fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.invoices-not-resend') }}</span>
                        </a>
                    </div>
                @endpermission
                <div data-kt-menu-trigger="click"
                    class="menu-item menu-accordion {{ url()->current() == route('admin.expense-categories.index') || url()->current() == route('admin.expenses.index') ? 'here hover show' : '' }} mb-1">
                    <span class="menu-link">
                        <span class="menu-icon">
                            <i class="bi bi-cash-stack fs-3" style="color: var(--sidebar-text-color);"></i>
                        </span>
                        <span class="menu-title fw-bold">{{ __('translations.expenses-management') }}</span>
                        <span class="menu-arrow"></span>
                    </span>
                    </a>
                    <div class="menu-sub menu-sub-accordion">
                        @permission('expense-categories-list')
                            <div class="menu-item">
                                <a class="menu-link {{ url()->current() == route('admin.expense-categories.index') ? 'active' : '' }}"
                                    href="{{ route('admin.expense-categories.index') }}">
                                    <span class="menu-bullet">
                                        <span class="bullet bullet-dot"></span>
                                    </span>
                                    <span class="menu-title">{{ __('translations.expense-categories') }}</span>
                                </a>
                            </div>
                        @endpermission
                        @permission('expenses-list')
                            <div class="menu-item">
                                <a class="menu-link {{ url()->current() == route('admin.expenses.index') ? 'active' : '' }}"
                                    href="{{ route('admin.expenses.index') }}">
                                    <span class="menu-bullet">
                                        <span class="bullet bullet-dot"></span>
                                    </span>
                                    <span class="menu-title">{{ __('translations.expenses') }}</span>
                                </a>
                            </div>
                        @endpermission
                    </div>
                </div>

                @permission('finance-reports')
                <div data-kt-menu-trigger="click" class="menu-item menu-accordion {{
                    url()->current() == route('admin.financial-reports.index') ||
                    url()->current() == route('admin.financial-reports.expenses') ||
                    url()->current() == route('admin.financial-reports.sales') ||
                    url()->current() == route('admin.financial-reports.profits') ||
                    url()->current() == route('admin.financial-reports.top-products')
                    ? 'here hover show' : '' }} mb-1">
                    <span class="menu-link">
                        <span class="menu-icon">
                            <i class="bi bi-clipboard-data fs-3" style="color: var(--sidebar-text-color);"></i>
                        </span>
                        <span class="menu-title fw-bold">{{ __('translations.financial-reports') }}</span>
                        <span class="menu-arrow"></span>
                    </span>
                    <div class="menu-sub menu-sub-accordion">
                        <div class="menu-item">
                            <a class="menu-link {{ url()->current() == route('admin.financial-reports.index') ? 'active' : '' }}"
                                href="{{ route('admin.financial-reports.index') }}">
                                <span class="menu-bullet">
                                    <span class="bullet bullet-dot"></span>
                                </span>
                                <span class="menu-title">{{ __('translations.dashboard') }}</span>
                            </a>
                        </div>
                        <div class="menu-item">
                            <a class="menu-link {{ url()->current() == route('admin.financial-reports.expenses') ? 'active' : '' }}"
                                href="{{ route('admin.financial-reports.expenses') }}">
                                <span class="menu-bullet">
                                    <span class="bullet bullet-dot"></span>
                                </span>
                                <span class="menu-title">{{ __('translations.expenses-report') }}</span>
                            </a>
                        </div>
                        <div class="menu-item">
                            <a class="menu-link {{ url()->current() == route('admin.financial-reports.sales') ? 'active' : '' }}"
                                href="{{ route('admin.financial-reports.sales') }}">
                                <span class="menu-bullet">
                                    <span class="bullet bullet-dot"></span>
                                </span>
                                <span class="menu-title">{{ __('translations.sales-report') }}</span>
                            </a>
                        </div>
                        <div class="menu-item">
                            <a class="menu-link {{ url()->current() == route('admin.financial-reports.profits') ? 'active' : '' }}"
                                href="{{ route('admin.financial-reports.profits') }}">
                                <span class="menu-bullet">
                                    <span class="bullet bullet-dot"></span>
                                </span>
                                <span class="menu-title">{{ __('translations.profits-report') }}</span>
                            </a>
                        </div>
                        <div class="menu-item">
                            <a class="menu-link {{ url()->current() == route('admin.financial-reports.top-products') ? 'active' : '' }}"
                                href="{{ route('admin.financial-reports.top-products') }}">
                                <span class="menu-bullet">
                                    <span class="bullet bullet-dot"></span>
                                </span>
                                <span class="menu-title">{{ __('translations.top-products-report') }}</span>
                            </a>
                        </div>
                    </div>
                </div>
                @endpermission

                <div class="menu-item menu-accordion">
                    <div class="menu-content pb-2 pt-3">
                        <span class="menu-section text-muted text-uppercase fs-7 fw-bold">{{ __('translations.system') }}</span>
                    </div>
                </div>

                @permission('settings')
                    <div class="menu-item">
                        <a class="menu-link {{ url()->current() == route('admin.settings') ? 'active' : '' }}"
                            href="{{ route('admin.settings') }}">
                            <span class="menu-icon">
                                <i class="bi bi-gear-fill fs-3" style="color: var(--sidebar-text-color);"></i>
                            </span>
                            <span class="menu-title fw-bold">{{ __('translations.settings') }}</span>
                        </a>
                    </div>
                @endpermission
            </div>
        </div>
    </div>
</div>
