@if ($tabData === null || $tabData->isEmpty())
    <x-ui.operational.empty-state :title="__('recruitment.vacancies.empty_tab.hiring')" />
@else
    <div class="table-responsive">
        <table class="table table-hover align-middle mb-0">
            <thead>
                <tr>
                    <th>{{ __('recruitment.common.reference') }}</th>
                    <th>{{ __('recruitment.offer_letters.fields.candidate') }}</th>
                    <th>{{ __('employees.fields.employee_reference') }}</th>
                    <th>{{ __('recruitment.vacancies.metrics.hired_at') }}</th>
                </tr>
            </thead>
            <tbody>
                @foreach ($tabData as $row)
                    <tr>
                        <td><code>{{ $row->reference_code }}</code></td>
                        <td>{{ $row->candidate?->full_name ?? '—' }}</td>
                        <td>
                            @if ($row->employee)
                                <a href="{{ route('hr.employees.edit', $row->employee) }}">{{ $row->employee->employee_code }}</a>
                            @else
                                —
                            @endif
                        </td>
                        <td>{{ $row->hired_at?->format('Y-m-d H:i') ?? '—' }}</td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    </div>
@endif
