@php
    $breadcrumbs = [
        ['label' => __('common.home'), 'url' => route('dashboard.index')],
        ['label' => __('common.hr')],
        ['label' => __('contracts.title'), 'url' => route('hr.contracts.index')],
        ['label' => __('contracts.edit_title')],
    ];
@endphp

<x-ui.layout.page
    :title="__('contracts.edit_title')"
    page-icon="fe fe-edit-2"
    :breadcrumbs="$breadcrumbs"
>
    <div class="d-flex gap-2 mb-3">
        <form method="POST" action="{{ route('hr.contracts.amend', $contract) }}">@csrf
            <x-ui.buttons.secondary type="submit">{{ __('contracts.actions.amend') }}</x-ui.buttons.secondary>
        </form>
        <form method="POST" action="{{ route('hr.contracts.renew', $contract) }}">@csrf
            <x-ui.buttons.secondary type="submit">{{ __('contracts.actions.renew') }}</x-ui.buttons.secondary>
        </form>
        <form method="POST" action="{{ route('hr.contracts.terminate', $contract) }}" class="d-flex gap-2">
            @csrf
            <input class="form-control" name="termination_reason" placeholder="{{ __('contracts.fields.termination_reason') }}">
            <x-ui.buttons.danger type="submit">{{ __('contracts.actions.terminate') }}</x-ui.buttons.danger>
        </form>
    </div>
    @include('pages.hr.contracts._form', [
        'action' => route('hr.contracts.update', $contract),
        'method' => 'PUT',
        'contract' => $contract,
        'employees' => $employees,
        'types' => $types,
        'templates' => $templates,
        'submitLabel' => __('contracts.actions.update'),
    ])
</x-ui.layout.page>
