@php $modalId = $modalId ?? 'modal-new-department'; @endphp
@php $inputClass = 'w-full px-3 py-2.5 text-sm border border-gray-200 rounded-lg bg-white focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors'; @endphp
<form class="space-y-6" method="POST" action="{{ route('departments.store') }}">
    @csrf
    <div>
        <label class="block text-sm font-medium text-gray-700 mb-2">Nom <span class="text-red-500">*</span></label>
        <input type="text" class="{{ $inputClass }}" @error('name') border-red-500 @enderror value="{{ old('name') }}" placeholder="Nom du département" required>
        @error('name')
        <p class="mt-1 text-sm text-red-600">{{ $message }}</p>
        @enderror
    </div>

    <div>
        <label class="block text-sm font-medium text-gray-700 mb-2">Nom du responsable <span class="text-red-500">*</span></label>
        <input type="text" class="{{ $inputClass }}" @error('name_of_manager') border-red-500 @enderror value="{{ old('name_of_manager') }}" placeholder="Nom du responsable" required>
        @error('name_of_manager')
        <p class="mt-1 text-sm text-red-600">{{ $message }}</p>
        @enderror
    </div>
    <div>
        <label class="block text-sm font-medium text-gray-700 mb-2">Téléphone du responsable <span class="text-red-500">*</span></label>
        <input type="text" class="{{ $inputClass }}" @error('phone_of_manager') border-red-500 @enderror value="{{ old('phone_of_manager') }}" placeholder="Numéro de téléphone du responsable" required>
        @error('phone_of_manager')
        <p class="mt-1 text-sm text-red-600">{{ $message }}</p>
        @enderror
    </div>
    @include('components.modals.modal-actions', ['modalId' => $modalId, 'submitLabel' => 'Ajouter le département'])
</form>
