<x-ui.layout.page :title="__('me.training.title')" page-icon="fe fe-book-open">
    <x-ui.table.table :columns="[
        ['label' => __('me.training.course')],
        ['label' => __('me.training.starts_at')],
        ['label' => __('me.training.hours')],
        ['label' => __('common.status')],
    ]">
        @forelse ($enrollments as $enrollment)
            <x-ui.table.row>
                <td>{{ $enrollment->session?->course?->name ?? '—' }}</td>
                <td>{{ $enrollment->session?->starts_at?->format('Y-m-d H:i') ?? '—' }}</td>
                <td>{{ $enrollment->hours }}</td>
                <td>{{ $enrollment->status }}</td>
            </x-ui.table.row>
        @empty
            <x-ui.table.row><td colspan="4">{{ __('common.no_results') }}</td></x-ui.table.row>
        @endforelse
    </x-ui.table.table>
</x-ui.layout.page>
