@php
    $breadcrumbs = [
        ['label' => __('common.home'), 'url' => route('dashboard.index')],
        ['label' => __('common.hr')],
        ['label' => __('hr_dashboard.title')],
    ];
    $cards = [
        ['key' => 'total_employees', 'icon' => 'fe fe-users'],
        ['key' => 'active_employees', 'icon' => 'fe fe-user-check'],
        ['key' => 'absent_today', 'icon' => 'fe fe-user-x'],
        ['key' => 'late_today', 'icon' => 'fe fe-clock'],
        ['key' => 'pending_leave', 'icon' => 'fe fe-calendar'],
        ['key' => 'on_leave_today', 'icon' => 'fe fe-briefcase'],
        ['key' => 'expiring_docs', 'icon' => 'fe fe-file-text'],
        ['key' => 'on_probation', 'icon' => 'fe fe-flag'],
    ];
@endphp

<x-ui.layout.page
    :title="__('hr_dashboard.title')"
    :subtitle="__('hr_dashboard.subtitle')"
    page-icon="fe fe-pie-chart"
    :breadcrumbs="$breadcrumbs"
>
    <div class="row g-3 mb-4">
        @foreach ($cards as $card)
            <x-ui.dashboard.stat-card
                :label="__('hr_dashboard.kpis.'.$card['key'])"
                :value="(string) ($kpis[$card['key']] ?? 0)"
                :icon="$card['icon']"
            />
        @endforeach
    </div>
</x-ui.layout.page>
