@props(['groupKey'])

<div class="erp-mega-section-title">{{ __('nav.mega.quick_actions') }}</div>
<div class="d-flex flex-column gap-1">
    @switch($groupKey)
        @case('dashboard')
            @if (\Illuminate\Support\Facades\Route::has('dashboard.index'))
                <a class="mega-quick-link" href="{{ route('dashboard.index') }}"><i
                        class="fe fe-home erp-mega-link-icon"></i>{{ __('nav.item.dashboard') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('operations.workflow-inbox.index'))
                <a class="mega-quick-link" href="{{ route('operations.workflow-inbox.index') }}"><i
                        class="fe fe-inbox erp-mega-link-icon"></i>{{ __('nav.item.workflow_inbox') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('notifications.index'))
                <a class="mega-quick-link" href="{{ route('notifications.index') }}"><i
                        class="fe fe-bell erp-mega-link-icon"></i>{{ __('notifications.title') }}</a>
            @endif
            @break

        @case('hr')
            <div class="erp-mega-quick-actions">
                @if (\Illuminate\Support\Facades\Route::has('me.dashboard'))
                    <a class="mega-quick-btn" href="{{ route('me.dashboard') }}"><i
                            class="fe fe-user" aria-hidden="true"></i><span>{{ __('nav.item.self_dashboard') }}</span></a>
                @endif
                @if (\Illuminate\Support\Facades\Route::has('hr.employees.index'))
                    <a class="mega-quick-btn" href="{{ route('hr.employees.index') }}"><i
                            class="fe fe-users" aria-hidden="true"></i><span>{{ __('nav.item.employees') }}</span></a>
                @endif
                @if (\Illuminate\Support\Facades\Route::has('hr.attendance.index'))
                    <a class="mega-quick-btn" href="{{ route('hr.attendance.index') }}"><i
                            class="fe fe-clock" aria-hidden="true"></i><span>{{ __('nav.item.attendance') }}</span></a>
                @endif
            </div>
            @break

        @case('inventory')
            @if (\Illuminate\Support\Facades\Route::has('inventory.warehouses.index'))
                <a class="mega-quick-link" href="{{ route('inventory.warehouses.index') }}"><i
                        class="fe fe-package erp-mega-link-icon"></i>{{ __('nav.item.inventory_warehouses') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('inventory.items.index'))
                <a class="mega-quick-link" href="{{ route('inventory.items.index') }}"><i
                        class="fe fe-layers erp-mega-link-icon"></i>{{ __('nav.item.inventory_items') }}</a>
            @endif
            @break

        @case('procurement')
            @if (\Illuminate\Support\Facades\Route::has('procurement.purchase-orders.index'))
                <a class="mega-quick-link"
                    href="{{ route('procurement.purchase-orders.index', ['status' => 'draft']) }}"><i
                        class="fe fe-file-text erp-mega-link-icon"></i>{{ __('nav.mega.open_draft_pos') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('procurement.goods-receipts.index'))
                <a class="mega-quick-link" href="{{ route('procurement.goods-receipts.index') }}"><i
                        class="fe fe-truck erp-mega-link-icon"></i>{{ __('nav.item.procurement_goods_receipts') }}</a>
            @endif
            @break

        @case('sales')
            @if (\Illuminate\Support\Facades\Route::has('sales.orders.index'))
                <a class="mega-quick-link"
                    href="{{ route('sales.orders.index', ['status' => 'draft']) }}"><i
                        class="fe fe-shopping-cart erp-mega-link-icon"></i>{{ __('nav.mega.open_draft_orders') }}</a>
                <a class="mega-quick-link" href="{{ route('sales.orders.index', ['view' => 'allocation']) }}"><i
                        class="fe fe-target erp-mega-link-icon"></i>{{ __('nav.item.sales_orders_allocation') }}</a>
                <a class="mega-quick-link" href="{{ route('sales.orders.index', ['view' => 'fulfillment']) }}"><i
                        class="fe fe-send erp-mega-link-icon"></i>{{ __('nav.item.sales_orders_fulfillment') }}</a>
            @endif
            @break

        @case('accounting')
            @if (\Illuminate\Support\Facades\Route::has('dashboard.accounting-hub'))
                <a class="mega-quick-link" href="{{ route('dashboard.accounting-hub') }}"><i
                        class="fe fe-pie-chart erp-mega-link-icon"></i>{{ __('nav.item.accounting_hub') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('tenant.modules.finance'))
                <a class="mega-quick-link" href="{{ route('tenant.modules.finance') }}"><i
                        class="fe fe-dollar-sign erp-mega-link-icon"></i>{{ __('nav.item.finance_workspace') }}</a>
            @endif
            @break

        @case('reports')
            @if (\Illuminate\Support\Facades\Route::has('exports.index'))
                <a class="mega-quick-link" href="{{ route('exports.index') }}"><i
                        class="fe fe-download erp-mega-link-icon"></i>{{ __('nav.item.exports') }}</a>
            @endif
            @break

        @case('operations')
            @if (\Illuminate\Support\Facades\Route::has('operations.control-center.index'))
                <a class="mega-quick-link" href="{{ route('operations.control-center.index') }}"><i
                        class="fe fe-activity erp-mega-link-icon"></i>{{ __('nav.item.operations_control_center') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('operations.workflow-inbox.index'))
                <a class="mega-quick-link" href="{{ route('operations.workflow-inbox.index') }}"><i
                        class="fe fe-inbox erp-mega-link-icon"></i>{{ __('nav.item.workflow_inbox') }}</a>
            @endif
            @break

        @case('administration')
            @if (\Illuminate\Support\Facades\Route::has('settings.users.index'))
                <a class="mega-quick-link" href="{{ route('settings.users.index') }}"><i
                        class="fe fe-users erp-mega-link-icon"></i>{{ __('nav.item.users') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('settings.roles.index'))
                <a class="mega-quick-link" href="{{ route('settings.roles.index') }}"><i
                        class="fe fe-shield erp-mega-link-icon"></i>{{ __('nav.item.roles') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('settings.languages.index'))
                <a class="mega-quick-link" href="{{ route('settings.languages.index') }}"><i
                        class="fe fe-globe erp-mega-link-icon"></i>{{ __('nav.item.languages') }}</a>
            @endif
            @if (\Illuminate\Support\Facades\Route::has('admin.dashboard'))
                <a class="mega-quick-link" href="{{ route('admin.dashboard') }}"><i
                        class="fe fe-sliders erp-mega-link-icon"></i>{{ __('nav.item.admin_dashboard') }}</a>
            @endif
            @break

        @default
    @endswitch
</div>
