@props(['contact' => null])

<div class="row g-3 mb-3">
    <div class="col-md-4">
        <x-ui.form.input name="full_name" :label="__('employees.emergency_contacts.full_name')"
            :value="$contact?->full_name" required />
    </div>
    <div class="col-md-4">
        <x-ui.form.input name="relationship" :label="__('employees.emergency_contacts.relationship')"
            :value="$contact?->relationship" required />
    </div>
    <div class="col-md-4">
        <x-ui.form.input name="phone" :label="__('employees.emergency_contacts.phone')"
            :value="$contact?->phone" required />
    </div>
    <div class="col-md-4">
        <x-ui.form.input name="phone_alt" :label="__('employees.emergency_contacts.phone_alt')"
            :value="$contact?->phone_alt" />
    </div>
    <div class="col-md-4">
        <x-ui.form.input name="email" type="email" :label="__('employees.emergency_contacts.email')"
            :value="$contact?->email" />
    </div>
    <div class="col-md-4">
        <x-ui.form.input name="address" :label="__('employees.emergency_contacts.address')"
            :value="$contact?->address" />
    </div>
    <div class="col-md-8">
        <x-ui.form.input name="notes" :label="__('employees.emergency_contacts.notes')"
            :value="$contact?->notes" />
    </div>
    <div class="col-md-4 d-flex align-items-end">
        <div class="form-check mb-3">
            <input class="form-check-input" type="checkbox" name="is_primary" value="1" id="ec_is_primary_{{ $contact?->id ?? 'new' }}"
                @checked(old('is_primary', $contact?->is_primary))>
            <label class="form-check-label" for="ec_is_primary_{{ $contact?->id ?? 'new' }}">
                {{ __('employees.emergency_contacts.is_primary') }}
            </label>
        </div>
    </div>
</div>
