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

<div class="row g-3 mb-3">
    <div class="col-md-4">
        <x-ui.form.input name="name" :label="__('employees.skills.name')" :value="$skill?->name" required />
    </div>
    <div class="col-md-3">
        <x-ui.form.select
            name="level"
            :label="__('employees.skills.level')"
            :options="[
                'beginner' => __('employees.skills.levels.beginner'),
                'intermediate' => __('employees.skills.levels.intermediate'),
                'advanced' => __('employees.skills.levels.advanced'),
                'expert' => __('employees.skills.levels.expert'),
            ]"
            :selected="old('level', $skill?->level ?? 'intermediate')"
            required
        />
    </div>
    <div class="col-md-2">
        <x-ui.form.input name="years_experience" type="number" min="0" max="60"
            :label="__('employees.skills.years_experience')" :value="$skill?->years_experience" />
    </div>
    <div class="col-md-3 d-flex align-items-end">
        <div class="form-check mb-3">
            <input class="form-check-input" type="checkbox" name="is_certified" value="1"
                id="skill_certified_{{ $skill?->id ?? 'new' }}"
                @checked(old('is_certified', $skill?->is_certified))>
            <label class="form-check-label" for="skill_certified_{{ $skill?->id ?? 'new' }}">
                {{ __('employees.skills.is_certified') }}
            </label>
        </div>
    </div>
    <div class="col-md-8">
        <x-ui.form.input name="notes" :label="__('employees.skills.notes')" :value="$skill?->notes" />
    </div>
</div>
