@if ($tabData === null || $tabData->isEmpty())
    <x-ui.operational.empty-state :title="__('recruitment.vacancies.empty_tab.interviews')" />
@else
    <div class="table-responsive">
        <table class="table table-hover align-middle mb-0">
            <thead>
                <tr>
                    <th>{{ __('recruitment.interviews.fields.reference') }}</th>
                    <th>{{ __('recruitment.interviews.fields.candidate') }}</th>
                    <th>{{ __('recruitment.interviews.fields.status') }}</th>
                    <th>{{ __('recruitment.interviews.fields.scheduled_at') }}</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                @foreach ($tabData as $row)
                    <tr>
                        <td><code>{{ $row->reference_code }}</code></td>
                        <td>{{ $row->application?->candidate?->full_name ?? '—' }}</td>
                        <td>{{ __('recruitment.interviews.status.'.$row->status) }}</td>
                        <td>{{ $row->scheduled_at?->format('Y-m-d H:i') ?? '—' }}</td>
                        <td class="text-end">
                            <a href="{{ route('hr.recruitment.interviews.edit', $row) }}" class="small">{{ __('common.view') }}</a>
                        </td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    </div>
    @if (method_exists($tabData, 'hasPages') && $tabData->hasPages())
        <div class="mt-3">{{ $tabData->links() }}</div>
    @endif
@endif
