<!-- Modal Add clint -->
<div class="modal fade" id="addClassRoom" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
    aria-labelledby="addClassRoom" aria-hidden="true">
    <div class="modal-dialog ">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title"><strong>إضافةدورة تدريبيةجديد </strong></h4>
                <i type="reset" data-bs-dismiss="modal" aria-label="Close"
                    class="las las la-times text-danger scale5"></i>
            </div>
            <div class="modal-body">
                <form id="studentForm" method="POST" action="{{ route('class_room_store') }}"
                    class="row g-3 fv-plugins-bootstrap5 fv-plugins-framework needs-validation form-disable"
                    novalidate>
                    @csrf
                    <div class="row">
                        <div class="col-12 col-md-12 fv-plugins-icon-container">
                            <label class="form-label" for="name">الاسم</label>
                            <input type="text" id="validationCustom01" value="{{ old('name') }}" name="name"
                                class="form-control text" placeholder="الرجاء ادخال الاسم" required="">
                            <p id="alert" class="massege"></p>
                            <div class="fv-plugins-message-container invalid-feedback ">
                                يرجاء ادخال الاسم
                            </div>
                            @error('name')
                                <div class="text-danger px-2 showModalAdd ">
                                    {{ $message }}
                                </div>
                            @enderror
                        </div>
                        <div class="col-12 col-md-12 fv-plugins-icon-container">
                            <label class="form-label" for="phone">البرنامج</label>
                            <select id="courseId" name="courseId" class="form-control" required>
                                <option selected id="myId" disabled="disabled" value="">يرجى اختيار
                                    البرنامج
                                </option>
                                @isset($courses)
                                    @foreach ($courses as $course)
                                        <option value="{{ $course->id }}">
                                            @isset($course->title)
                                                {{ $course->title }}
                                            @endisset
                                        </option>
                                    @endforeach
                                @endisset
                            </select>
                            <p id="alertPhone" class="massege"></p>
                            <div class="fv-plugins-message-container invalid-feedback ">
                                يرجى تحديد البرنامج
                            </div>
                            @error('courseId')
                                <div class="text-danger px-2 showModalAdd ">
                                    {{ $message }}
                                </div>
                            @enderror
                        </div>

                        <div class="col-12 col-md-12 fv-plugins-icon-container">
                            <label class="form-label" for="place">المكان</label>
                            <input type="text" id="place" value="{{ old('place') }}" name="place"
                                class="form-control text" placeholder="الرجاء ادخال المكان" required="">
                            <p id="alert" class="massege"></p>
                            <div class="fv-plugins-message-container invalid-feedback ">
                                يرجاء ادخال المكان
                            </div>
                            @error('name')
                                <div class="text-danger px-2 showModalAdd ">
                                    {{ $message }}
                                </div>
                            @enderror
                        </div>
                        <div class="col-12 col-md-12 fv-plugins-icon-container">
                            <label class="form-label" for="trainerId">المشرف أو مسؤل جهة التدريب</label>
                            <select id="trainerId" name="trainerId" class="form-control" required>
                                <option selected id="myId" disabled="disabled" value="">يرجى اختيار المشرف
                                </option>
                                @isset($trainers)
                                    @foreach ($trainers as $trainer)
                                        @if ($trainer->is_reset == 1)
                                            <option value="{{ $trainer->id }}">
                                                @isset($trainer->name)
                                                    {{ $trainer->name }}
                                                @endisset
                                            </option>
                                        @else
                                            <option class="text-warning "disabled value="{{ $trainer->id }}">
                                                @isset($trainer->name)
                                                    المشرف {{ $trainer->name }} لم يفعل الحساب بعد
                                                @endisset
                                            </option>
                                        @endif
                                    @endforeach
                                @endisset
                            </select>
                            <p id="alertPhone" class="massege"></p>
                            <div class="fv-plugins-message-container invalid-feedback ">
                                يرجى تحديد المشرف
                            </div>
                            @error('trainerId')
                                <div class="text-danger px-2 showModalAdd ">
                                    {{ $message }}
                                </div>
                            @enderror
                        </div>

                        <div class="col-12 col-md-12 fv-plugins-icon-container">
                            <label class="form-label" for="coordinatorId">المنسق أو مسؤل جهة التدريب</label>
                            <select id="coordinatorId" name="coordinatorId" class="form-control" required>
                                <option selected id="myId" disabled="disabled" value="">يرجى اختيار المنسق
                                </option>
                                @isset($coordinators)
                                    @foreach ($coordinators as $coordinator)
                                        @if ($coordinator->is_reset == 1)
                                            <option value="{{ $coordinator->id }}">
                                                @isset($coordinator->name)
                                                    {{ $coordinator->name }}
                                                @endisset
                                            </option>
                                        @else
                                            <option class="text-warning "disabled value="{{ $coordinator->id }}">
                                                @isset($coordinator->name)
                                                    المنسق {{ $coordinator->name }} لم يفعل الحساب بعد
                                                @endisset
                                            </option>
                                        @endif
                                    @endforeach
                                @endisset
                            </select>
                            <p id="alertPhone" class="massege"></p>
                            <div class="fv-plugins-message-container invalid-feedback ">
                                يرجى تحديد المنسق
                            </div>
                            @error('coordinatorId')
                                <div class="text-danger px-2 showModalAdd ">
                                    {{ $message }}
                                </div>
                            @enderror
                        </div>

                        <div class="modal-footer">
                            <button type="submit"
                                class="btn btn-primary me-sm-3 me-1 form-btn-disable">اضافة</button>
                            <button type="reset" class="btn btn-label-secondary" data-bs-dismiss="modal"
                                aria-label="Close">الغاء</button>
                        </div>

                </form>
            </div>
        </div>
    </div>
</div>

<!-- End Modal Add clint -->
