<x-ui.layout.page :title="__('contracts.templates.title')" page-icon="fe fe-file-text">
    <x-slot:actions><x-ui.buttons.primary :href="route('hr.contract-templates.create')">
        {{ __('common.create') }}</x-ui.buttons.primary></x-slot:actions>
    <x-ui.table.table :columns="[
        ['label' => __('contracts.templates.name')],
        ['label' => __('contracts.fields.contract_type')],
        ['label' => __('contracts.fields.status')],
        ['label' => __('common.actions'), 'align' => 'end'],
    ]">
        @forelse ($templates as $template)
            <x-ui.table.row>
                <td>{{ $template->name }}</td>
                <td>{{ __('contracts.types.'.$template->contract_type) }}</td>
                <td>{{ $template->is_active ? __('contracts.status.active') : __('contracts.status.inactive') }}</td>
                <td class="text-end"><x-ui.buttons.secondary size="sm"
                    :href="route('hr.contract-templates.edit', $template)">{{ __('common.edit') }}</x-ui.buttons.secondary></td>
            </x-ui.table.row>
        @empty
            <x-ui.table.row><td colspan="4">{{ __('contracts.templates.empty') }}</td></x-ui.table.row>
        @endforelse
    </x-ui.table.table>
</x-ui.layout.page>
