
<?php $__env->startSection('content'); ?>
<form action="<?php echo e(route('admin.students.create')); ?>" method="post">
    <?php echo csrf_field(); ?>
    <div class="card">
        <div class="border-bottom card-header">
            <h4 class="card-title"><?php echo e(trans('general.add_student')); ?></h4>
            <div>
                <button type="submit" class="btn btn-primary waves-effect waves-float waves-light"><?php echo e(trans('general.save')); ?></button>
                <button type="reset" class="btn btn-outline-secondary waves-effect"><?php echo e(trans('general.reset')); ?></button>
            </div>
        </div>
    </div>
    <div class="card">
        <div class="border-bottom card-header">
            <h4 class="card-title"><?php echo e(trans('general.stduent_data')); ?></h4>
        </div>


        <div class="card-body  mb-2">
            <div class="row pt-2">
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="fname"><?php echo e(trans('general.First Name')); ?></label>
                        <input required type="text" name="firstName" class="form-control" id="fname" value="<?php echo e(old('firstName')? old('firstName') : ''); ?>">
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="lname"><?php echo e(trans('general.Last Name')); ?></label>
                        <input required type="text" name="lastName" class="form-control" id="lname" value="<?php echo e(old('lastName')? old('lastName') : ''); ?>">
                    </div>
                </div>

                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="genderSelect"><?php echo e(trans('general.gender')); ?></label>
                        <select required name="gender" class="form-select" id="genderSelect">
                            <option value="">--</option>
                            <option value="male" <?php echo e(old('gender')? ('male' == old('gender')? 'selected':'') : ''); ?>><?php echo e(trans('general.male')); ?></option>
                            <option value="female" <?php echo e(old('gender')? ('female' == old('gender')? 'selected':'') : ''); ?>><?php echo e(trans('general.female')); ?></option>
                        </select>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="username"><?php echo e(trans('general.nationality')); ?></label>
                        <select required name="nationality" class="form-select" id="nationality">
                            <option value="">--</option>
                            <?php $__currentLoopData = $nationalities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nationality): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($nationality->id); ?>" <?php echo e(old('nationality')? ($nationality->id == old('nationality')? 'selected':'') : ''); ?>><?php echo e($nationality->title); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="birth_place"><?php echo e(trans('general.birth_place')); ?></label>
                        <input required type="text" name="birth_place" class="form-control" id="birth_place" value="<?php echo e(old('birth_place')? old('birth_place') : ''); ?>">
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="birth_date"><?php echo e(trans('general.birth_date')); ?></label>
                        <input type="text" name="birth_date" id="birth_date" class="form-control flatpickr-basic" value="<?php echo e(old('birth_date')? old('birth_date') : ''); ?>" placeholder="YYYY-MM-DD" />
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="religion"><?php echo e(trans('general.religion')); ?></label>
                        <select required name="religion" class="form-select" id="religion">
                            <option value="">--</option>
                            <?php $__currentLoopData = $religions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $religion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($religion->id); ?>" <?php echo e(old('religion')? ($religion->id == old('religion')? 'selected':'') : ''); ?>><?php echo e($religion->name); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="stage"><?php echo e(trans('general.stage')); ?></label>
                        <select required name="stage" onchange="stageLevels(this.value)" class="form-select" id="stage">
                            <option value="">--</option>
                            <?php $__currentLoopData = $stages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stage): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($stage->id); ?>" <?php echo e(old('stage')? ($stage->id == old('stage')? 'selected':'') : ''); ?>><?php echo e($stage->title); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="level_to_study"><?php echo e(trans('general.level_to_study')); ?></label>
                        <select required name="level_to_study" onchange="levelDivisions(this.value)" class="form-select" id="level_to_study">
                            <option value="">--</option>
                        </select>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="division"><?php echo e(trans('general.division')); ?></label>
                        <select required name="division" class="form-select" id="division">
                            <option value="">--</option>
                        </select>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="phone"><?php echo e(trans('general.phone')); ?></label>
                        <div class="input-group input-group-merge">
                            <input required type="text" name="phone" class="form-control phone-number-mask" id="phone" value="<?php echo e(old('phone')? old('phone') : ''); ?>">
                            <span class="input-group-text">SY (+963)</span>
                        </div>
                    </div>
                </div>

                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="telephone"><?php echo e(trans('general.telephone')); ?></label>
                        <div class="input-group input-group-merge">
                            <input required type="text" name="telephone" class="form-control phone-number-mask" id="telephone" value="<?php echo e(old('telephone')? old('telephone') : ''); ?>">
                            <span class="input-group-text">SY (+963)</span>
                        </div>
                    </div>
                </div>
                <div class="col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="total_installment"><?php echo e(trans('general.total_installment')); ?></label>
                        <input required type="number" name="total_installment" class="form-control" id="total_installment" value="<?php echo e(old('total_installment')? old('total_installment') : ''); ?>">
                    </div>
                </div>
            </div>
        </div>
        <!-- <div class="card-footer">
            <button type="submit" class="btn btn-primary waves-effect waves-float waves-light"><?php echo e(trans('general.save')); ?></button>
            <button type="reset" class="btn btn-outline-secondary waves-effect"><?php echo e(trans('general.reset')); ?></button>
        </div> -->

    </div>

    <div class="card">
        <div class="border-bottom card-header">
            <h4 class="card-title"><?php echo e(trans('general.student_parents_info')); ?></h4>
        </div>
        <!-- <hr class="mb-0"> -->
        <div class="border-bottom card-header justify-content-center">
            <h4 class="card-title"><?php echo e(trans('general.mother')); ?></h4>
        </div>
        <div class="demo-inline-spacing justify-content-around">
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="addMotherType" id="exist-mother-account" value="0" <?php echo e(old('addMotherType')? ('0' == old('addMotherType')? 'checked':'') : 'checked'); ?>>
                <label class="form-check-label" for="exist-mother-account">حساب موجود سابقاً</label>
            </div>
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="addMotherType" id="new-mother-account" value="1" <?php echo e(old('addMotherType')? ('1' == old('addMotherType')? 'checked':'') : ''); ?>>
                <label class="form-check-label" for="new-mother-account">حساب جديد</label>
            </div>

        </div>
        <div class="card-body">

            <input class="form-control input" oninput="getMothersSuggestions(this)" type="text" placeholder="بحث: الاسم او رقم الجوال">
            <div class="text-center  overlay-light p-2" style="display: none;" id="mothers-suggestions-spinner">
                <div class="spinner-border" role="status">
                    <span class="visually-hidden">Loading...</span>
                </div>
            </div>
            <div id="mother-search-list" class="list-group hide-scrollbars" style="max-height: 200px; overflow-y: auto;">

            </div>

            <div class="row pt-2">
                <input type="hidden" name="exest_mother_id" id="mother_id" value="<?php echo e(old('exest_mother_id')? old('exest_mother_id') : ''); ?>">
                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="mother_fname"><?php echo e(trans('general.First Name')); ?></label>
                        <input disabled required type="text" name="mother_firstName" class="form-control" id="mother_fname" value="<?php echo e(old('mother_firstName')? old('mother_firstName') : ''); ?>">
                    </div>
                </div>
                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="mother_lname"><?php echo e(trans('general.Last Name')); ?></label>
                        <input disabled required type="text" name="mother_lastName" class="form-control" id="mother_lname" value="<?php echo e(old('mother_lastName')? old('mother_lastName') : ''); ?>">
                    </div>
                </div>

                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="mother_job"><?php echo e(trans('general.job')); ?></label>
                        <input disabled required type="text" name="mother_job" class="form-control" id="mother_job" value="<?php echo e(old('mother_job')? old('mother_job') : ''); ?>">
                    </div>
                </div>
                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="mother_phone"><?php echo e(trans('general.phone')); ?></label>
                        <div class="input-group input-group-merge">
                            <input disabled required type="text" name="mother_phone" class="form-control phone-number-mask" id="mother_phone" value="<?php echo e(old('mother_phone')? old('mother_phone') : ''); ?>">
                            <span class="input-group-text">SY (+963)</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <hr class="mb-0">
        <div class="border-bottom card-header justify-content-center">
            <h4 class="card-title"><?php echo e(trans('general.father')); ?></h4>
        </div>
        <div class="demo-inline-spacing justify-content-around">
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="addFatherType" id="exist-father-account" value="0" <?php echo e(old('addFatherType')? ('0' == old('addFatherType')? 'checked':'') : 'checked'); ?>>
                <label class="form-check-label" for="exist-father-account">حساب موجود سابقاً</label>
            </div>
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="addFatherType" id="new-father-account" value="1" <?php echo e(old('addFatherType')? ('1' == old('addFatherType')? 'checked':'') : ''); ?>>
                <label class="form-check-label" for="new-father-account">حساب جديد</label>
            </div>

        </div>
        <div class="card-body mb-2">
            <input class="form-control input" oninput="getFathersSuggestions(this)" type="text" placeholder="بحث: الاسم او رقم الجوال">

            <div class="text-center overlay-light p-2" style="display: none;" id="fathers-suggestions-spinner">
                <div class="spinner-border" role="status">
                    <span class="visually-hidden">Loading...</span>
                </div>
            </div>
            <div id="father-search-list" class="list-group hide-scrollbars" style="max-height: 200px; overflow-y: auto;">

            </div>

            <div class="row pt-2">
                <input type="hidden" name="exest_father_id" id="father_id" value="<?php echo e(old('exest_father_id')? old('exest_father_id') : ''); ?>">
                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="father_fname"><?php echo e(trans('general.First Name')); ?></label>
                        <input disabled required type="text" name="father_firstName" class="form-control" id="father_fname" value="<?php echo e(old('father_firstName')? old('father_firstName') : ''); ?>">
                    </div>
                </div>
                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="father_lname"><?php echo e(trans('general.Last Name')); ?></label>
                        <input disabled required type="text" name="father_lastName" class="form-control" id="father_lname" value="<?php echo e(old('father_lastName')? old('father_lastName') : ''); ?>">
                    </div>
                </div>

                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="father_job"><?php echo e(trans('general.job')); ?></label>
                        <input disabled required type="text" name="father_job" class="form-control" id="father_job" value="<?php echo e(old('father_job')? old('father_job') : ''); ?>">
                    </div>
                </div>
                <div class="col-xxl-3 col-xl-3 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="father_phone"><?php echo e(trans('general.phone')); ?></label>
                        <div class="input-group input-group-merge">
                            <input disabled required type="text" name="father_phone" class="form-control phone-number-mask" id="father_phone" value="<?php echo e(old('father_phone')? old('father_phone') : ''); ?>">
                            <span class="input-group-text">SY (+963)</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>

    <div class="card">
        <div class="border-bottom card-header">
            <h4 class="card-title"><?php echo e(trans('general.student_address_transportation')); ?></h4>
        </div>
        <!-- <hr class="mb-0"> -->


        <div class="row px-2">
            <div class="col-sm-4 col-12  mt-1">
                <?php echo e(trans('general.transportation')); ?>

            </div>
            <div class="col-sm-4 col-6  mt-1 text-nowrap">
                <input class="form-check-input" type="radio" name="transportation" id="trans-subscriber" value="1" <?php echo e(old('transportation')? ('1' == old('transportation')? 'checked':'') : ''); ?>>
                <label class="form-check-label" for="trans-subscriber"><?php echo e(trans("general.subscriber")); ?></label>
            </div>
            <div class="col-sm-4 col-6  mt-1 text-nowrap">
                <input class="form-check-input" type="radio" name="transportation" id="trans-non-subscriber" value="0" <?php echo e(old('transportation')? ('0' == old('transportation')? 'checked':'') : 'checked'); ?>>
                <label class="form-check-label" for="trans-non-subscriber"><?php echo e(trans("general.non-subscriber")); ?></label>
            </div>
        </div>
        <hr>

        <div class="mb-1" id="transportation-selector" style="display: none;">
            <div class="card-body">
                <label class="form-label" for="transportation_line"><?php echo e(trans('general.transportation_line')); ?></label>
                <select name="transportation_line" class="form-select" id="transportation_line">
                    <option value="">--</option>
                    <?php $__currentLoopData = $transportations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $transportation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($transportation->id); ?>" <?php echo e(old('transportation_line')? ($transportation->id == old('transportation_line')? 'selected':'') : ''); ?>><?php echo e($transportation->title); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
            <hr>
        </div>

        <div class="border-bottom card-header">
            <h4 class="card-title"><?php echo e(trans('general.address')); ?></h4>
        </div>

        <div class="card-body">

            <div class="row pt-2">
                <div class="col-xl-6 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="city"><?php echo e(trans('general.city')); ?></label>
                        <select required name="city" class="form-select" id="city">
                            <option value="">--</option>
                            <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($city->id); ?>" <?php echo e(old('city')? ($city->id == old('city')? 'selected':'') : ''); ?>><?php echo e($city->title); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                </div>
                <div class="col-xl-6 col-md-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="area"><?php echo e(trans('general.area')); ?></label>
                        <input required type="text" name="area" class="form-control" id="area" value="<?php echo e(old('area')? old('area') : ''); ?>">
                    </div>
                </div>

                <div class="col-12">
                    <div class="mb-1">
                        <label class="form-label" for="street"><?php echo e(trans('general.street')); ?></label>
                        <textarea required name="street" id="street" class="form-control" rows="3"><?php echo e(old('street')? old('street') : ''); ?></textarea>
                    </div>
                </div>

            </div>
        </div>
        <hr>
        <div class="border-bottom card-header">
            <h4 class="card-title"><?php echo e(trans('general.emergency')); ?></h4>
        </div>

        <div class="card-body mb-2">
            <div class="row pt-2">
                <div class="col-sm-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="emergency_phone"><?php echo e(trans('general.phone')); ?></label>
                        <div class="input-group input-group-merge">
                            <input required type="text" name="emergency_phone" class="form-control phone-number-mask" id="emergency_phone" value="<?php echo e(old('emergency_phone')? old('emergency_phone') : ''); ?>">
                            <span class="input-group-text">SY (+963)</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 col-12">
                    <div class="mb-1">
                        <label class="form-label" for="kinship"><?php echo e(trans('general.kinship')); ?></label>
                        <input required type="text" name="kinship" class="form-control" id="kinship" value="<?php echo e(old('kinship')? old('kinship') : ''); ?>">
                    </div>
                </div>
            </div>
        </div>
    </div>


    <section class="form-control-repeater">
        <div class="row">
            <!-- school-sequence repeater -->
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title"><?php echo e(trans("general.school_sequence")); ?></h4>
                    </div>
                    <div class="card-body">
                        <div class="school-sequence-repeater">
                            <div data-repeater-list="school_sequence">
                                <div data-repeater-item>
                                    <div class="row d-flex align-items-end">
                                        <div class="col-md-2 col-12">
                                            <div class="mb-1">
                                                <label class="form-label"><?php echo e(trans('general.class')); ?></label>
                                                <select required name="level" class="form-select">
                                                    <option value="">--</option>
                                                    <?php $__currentLoopData = $levels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $level): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($level->id); ?>" <?php echo e(old('level')? ($level->id == old('level')? 'selected':'') : ''); ?>><?php echo e($level->title); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-3 col-12">
                                            <div class="mb-1">
                                                <label class="form-label"><?php echo e(trans("general.school_name")); ?></label>
                                                <input required type="text" name="school_name" class="form-control" />
                                            </div>
                                        </div>
                                        <div class="col-md-2 col-12">
                                            <div class="mb-1">
                                                <label class="form-label"><?php echo e(trans("general.year")); ?></label>
                                                <input required type="text" name="year" class="form-control" />
                                            </div>
                                        </div>


                                        <div class="col-md-4 col-12">
                                            <!-- button group radio -->
                                            <div class="btn-group mb-1 d-grid" role="group" aria-label="Basic radio toggle button group">
                                                <div class="row">
                                                    <div class="radio-elements col-6 d-grid">
                                                        <input required type="radio" class="btn-check" name="status" value="1" autocomplete="off">
                                                        <label class="btn btn-outline-success waves-effect text-truncate" onclick="checkNearest(this)"><?php echo e(trans('general.passed')); ?></label>
                                                    </div>
                                                    <div class="radio-elements col-6 d-grid">
                                                        <input required type="radio" class="btn-check" name="status" value="0" autocomplete="off">
                                                        <label class="btn btn-outline-danger waves-effect text-truncate" onclick="checkNearest(this)"><?php echo e(trans('general.fail')); ?></label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>



                                        <div class="col-md-1 col-12">
                                            <div class="mb-1">
                                                <button class="btn btn-outline-danger text-nowrap px-25 w-100" data-repeater-delete type="button">
                                                    <i data-feather="x"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr>
                                </div>
                            </div>
                            <button type="button" class="btn btn-icon btn-primary" data-repeater-create>
                                <i data-feather="plus" class="me-25"></i>
                                <span><?php echo e(trans("general.add")); ?></span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /school-sequence repeater -->
        </div>
    </section>
    <section class="form-control-repeater">
        <div class="row">
            <!-- school-sequence repeater -->
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title"><?php echo e(trans("general.languages")); ?></h4>
                    </div>
                    <div class="card-body">
                        <div class="languages-repeater">
                            <div data-repeater-list="languages">
                                <div data-repeater-item>
                                    <div class="row d-flex align-items-end">
                                        <div class="col-md-3 col-12">
                                            <div class="mb-1">
                                                <label class="form-label"><?php echo e(trans('general.language')); ?></label>
                                                <select required name="language" class="form-select">
                                                    <option value="">--</option>
                                                    <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($language->id); ?>" <?php echo e(old('language')? ($language->id == old('language')? 'selected':'') : ''); ?>><?php echo e($language->title); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-8 col-12">
                                            <!-- button group radio -->
                                            <div class="btn-group mb-1 d-grid" role="group" aria-label="Basic radio toggle button group">
                                                <div class="row">
                                                    <div class="radio-elements col-3 d-grid">
                                                        <input required type="radio" class="btn-check" name="level" value="4" autocomplete="off">
                                                        <label class="btn btn-outline-dark waves-effect text-truncate" onclick="checkNearest(this)"><?php echo e(trans('general.very_good')); ?></label>
                                                    </div>
                                                    <div class="radio-elements col-3 d-grid">
                                                        <input required type="radio" class="btn-check" name="level" value="3" autocomplete="off">
                                                        <label class="btn btn-outline-success waves-effect text-truncate" onclick="checkNearest(this)"><?php echo e(trans('general.good')); ?></label>
                                                    </div>
                                                    <div class="radio-elements col-3 d-grid">
                                                        <input required type="radio" class="btn-check" name="level" value="2" autocomplete="off">
                                                        <label class="btn btn-outline-warning waves-effect text-truncate" onclick="checkNearest(this)"><?php echo e(trans('general.mid')); ?></label>
                                                    </div>
                                                    <div class="radio-elements col-3 d-grid">
                                                        <input required type="radio" class="btn-check" name="level" value="1" autocomplete="off">
                                                        <label class="btn btn-outline-danger waves-effect text-truncate" onclick="checkNearest(this)"><?php echo e(trans('general.low')); ?></label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>



                                        <div class="col-md-1 col-12">
                                            <div class="mb-1">
                                                <button class="btn btn-outline-danger text-nowrap px-25 w-100" data-repeater-delete type="button">
                                                    <i data-feather="x"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr>
                                </div>
                            </div>
                            <button type="button" class="btn btn-icon btn-primary" data-repeater-create>
                                <i data-feather="plus" class="me-25"></i>
                                <span><?php echo e(trans("general.add")); ?></span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /school-sequence repeater -->
        </div>
    </section>
    <section class="form-control-repeater">
        <div class="row">
            <!-- health problems repeater -->
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title"><?php echo e(trans("general.health_problems")); ?></h4>
                    </div>
                    <div class="card-body">
                        <div class="health-problems-repeater">
                            <div data-repeater-list="health-problems">
                                <div data-repeater-item>
                                    <div class="row d-flex align-items-end">
                                        <div class="col-3">
                                            <div class="mb-1">
                                                <label class="form-label"><?php echo e(trans("general.health_problem_type")); ?></label>
                                                <input required type="text" name="health_problem" class="form-control" />
                                            </div>
                                        </div>
                                        <div class="col-7">
                                            <div class="mb-1">
                                                <label class="form-label"><?php echo e(trans("general.description")); ?></label>
                                                <textarea required name="description" rows="1" style="padding-top: 5.6px !important; padding-bottom: 5.6px !important;" class="form-control "></textarea>
                                            </div>
                                        </div>

                                        <div class="col-2">
                                            <div class="mb-1">
                                                <button class="btn btn-outline-danger text-nowrap px-25 w-100" data-repeater-delete type="button">
                                                    <i data-feather="x"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr>
                                </div>
                            </div>
                            <button type="button" class="btn btn-icon btn-primary" data-repeater-create>
                                <i data-feather="plus" class="me-25"></i>
                                <span><?php echo e(trans("general.add")); ?></span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /health problems repeater -->
        </div>
    </section>

    <div class="card">
        <div class="card-footer">
            <button type="submit" class="btn btn-primary waves-effect waves-float waves-light"><?php echo e(trans('general.save')); ?></button>
            <button type="reset" class="btn btn-outline-secondary waves-effect"><?php echo e(trans('general.reset')); ?></button>
        </div>
    </div>

</form>


<?php $__env->startPush('scripts'); ?>
<script src="<?php echo e(url('design')); ?>/app-assets/vendors/js/forms/repeater/jquery.repeater.min.js"></script>

<script src="<?php echo e(url('design')); ?>/app-assets/vendors/js/pickers/flatpickr/flatpickr.min.js"></script>
<!-- BEGIN: Page Vendor JS-->
<!-- <script src="<?php echo e(url('design')); ?>/app-assets/vendors/js/forms/select/select2.full.min.js"></script> -->
<!-- END: Page Vendor JS-->

<!-- BEGIN: Page JS-->
<!-- <script src="<?php echo e(url('design')); ?>/app-assets/js/scripts/forms/form-select2.js"></script> -->
<!-- END: Page JS-->

<script>
    $(document).ready(function() {

        $(function() {
            'use strict';

            // form repeater jquery
            $('.school-sequence-repeater, .languages-repeater, .repeater-default, .health-problems-repeater').repeater({
                initEmpty: true,
                show: function() {
                    $(this).slideDown();
                    // Feather Icons
                    if (feather) {
                        feather.replace({
                            width: 14,
                            height: 14
                        });
                    }
                },
                hide: function(deleteElement) {
                    if (confirm('<?php echo e(trans("general.Are you sure you want to delete this element?")); ?>')) {
                        $(this).slideUp(deleteElement);
                    }
                },

            });
        });

    });

    $(document).ready(function() {
        $("input[name='transportation']").change(function() {
            if ($(this).val() == 0) { // non subscriber
                $("#transportation-selector").css('display', 'none');
                $("#transportation_line").val("");
            } else if ($(this).val() == 1) { // subscriber
                $("#transportation-selector").css('display', '');
            }
        });
    });
    $(document).ready(function() {
        if ("<?php echo e(old('stage')); ?>") {
            stageLevels("<?php echo e(old('stage')); ?>");
            levelDivisions("<?php echo e(old('level_to_study')); ?>");
        }
    });

    $(document).ready(function() {
        $("input[name='addMotherType']").change(function() {

            if ($(this).val() == 1) {
                $("#mother_fname").removeAttr('disabled');
                $("#mother_lname").removeAttr('disabled');
                $("#mother_job").removeAttr('disabled');
                $("#mother_phone").removeAttr('disabled');
                $("#mother_id").val('');
                $("#mother_fname").val('');
                $("#mother_lname").val('');
                $("#mother_job").val('');
                $("#mother_phone").val('');
            } else {
                $("#mother_fname").attr('disabled', 'disabled');
                $("#mother_lname").attr('disabled', 'disabled');
                $("#mother_job").attr('disabled', 'disabled');
                $("#mother_phone").attr('disabled', 'disabled');
            }
        });


        $("input[name='addFatherType']").change(function() {

            if ($(this).val() == 1) {
                $("#father_fname").removeAttr('disabled');
                $("#father_lname").removeAttr('disabled');
                $("#father_job").removeAttr('disabled');
                $("#father_phone").removeAttr('disabled');
                $("#father_fname").val('');
                $("#father_lname").val('');
                $("#father_job").val('');
                $("#father_phone").val('');
                $("#father_id").val('');
            } else {
                $("#father_fname").attr('disabled', 'disabled');
                $("#father_lname").attr('disabled', 'disabled');
                $("#father_job").attr('disabled', 'disabled');
                $("#father_phone").attr('disabled', 'disabled');
            }
        });

        console.log($("#mother_id").val());
        console.log($("#father_id").val());
        if ($('#new-mother-account').is(':checked')) {
            $("#mother_fname").removeAttr('disabled');
            $("#mother_lname").removeAttr('disabled');
            $("#mother_job").removeAttr('disabled');
            $("#mother_phone").removeAttr('disabled');
        }
        if ($('#new-father-account').is(':checked')) {
            $("#father_fname").removeAttr('disabled');
            $("#father_lname").removeAttr('disabled');
            $("#father_job").removeAttr('disabled');
            $("#father_phone").removeAttr('disabled');
        }
    });
    (function(window, document, $) {
        'use strict';
        $('.flatpickr-basic').flatpickr();
    })(window, document, jQuery);


    function getMothersSuggestions(element) {
        if (element.value != "") {
            $("#mothers-suggestions-spinner").show();
            var jqxhr = $.ajax({
                    url: "<?php echo e(route('admin.parents.mother.search')); ?>",
                    method: "GET",
                    timeout: 0,
                    data: {
                        "key": element.value,
                    },
                })
                .done(function(response) {
                    $("#mothers-suggestions-spinner").hide();
                    setDataToMothersSuggestionsList(response.data);
                    console.log(response);
                })
                .fail(function(response) {
                    $("#mothers-suggestions-spinner").hide();
                    setDataToMothersSuggestionsList([]);
                    console.log(response);
                });

        } else {
            $("#mothers-suggestions-spinner").hide();
            setDataToMothersSuggestionsList([]);
        }
    }

    function setDataToMothersSuggestionsList(data) {
        $("#mother-search-list").html("");
        data.forEach(function(item) {
            $("#mother-search-list").append(`<a href="#" id="${item.id}" onclick="setMotherData(this)" class="list-group-item list-group-item-action">
                <div class="row">
                    <div class="col-sm-3 col-6 mother-first">${item.first_name}</div>
                    <div class="col-sm-3 col-6 mother-last">${item.last_name}</div>
                    <div class="col-sm-3 col-6 mother-phone">${item.phone}</div>
                    <div class="col-sm-3 col-6 mother-job">${item.job}</div>
                </div>
            </a>`);
        });
    }

    function setMotherData(element) {

        $("#mother_fname").val($(element).find(".mother-first").html());
        $("#mother_lname").val($(element).find(".mother-last").html());
        $("#mother_phone").val($(element).find(".mother-phone").html());
        $("#mother_job").val($(element).find(".mother-job").html());
        $("#mother_id").val($(element).attr("id"));
        setDataToMothersSuggestionsList([]);
        $("#exist-mother-account").click();
    }

    function getFathersSuggestions(element) {

        if (element.value != "") {
            $("#fathers-suggestions-spinner").show();
            var jqxhr = $.ajax({
                    url: "<?php echo e(route('admin.parents.father.search')); ?>",
                    method: "GET",
                    timeout: 0,
                    data: {
                        "key": element.value,
                    },
                })
                .done(function(response) {
                    $("#fathers-suggestions-spinner").hide();
                    setDataToFathersSuggestionsList(response.data);
                    console.log(response);
                })
                .fail(function(response) {
                    $("#fathers-suggestions-spinner").hide();
                    setDataToFathersSuggestionsList([])
                    console.log(response);
                });
        } else {
            setDataToFathersSuggestionsList([]);
            $("#fathers-suggestions-spinner").hide();
        }
    }

    function setDataToFathersSuggestionsList(data) {
        $("#father-search-list").html("");
        data.forEach(function(item) {
            $("#father-search-list").append(`<a href="#" id="${item.id}" onclick="setFatherData(this)" class="list-group-item list-group-item-action">
                <div class="row">
                    <div class="col-sm-3 col-6 father-first">${item.first_name}</div>
                    <div class="col-sm-3 col-6 father-last">${item.last_name}</div>
                    <div class="col-sm-3 col-6 father-phone">${item.phone}</div>
                    <div class="col-sm-3 col-6 father-job">${item.job}</div>
                </div>
            </a>`);
        });
    }

    function setFatherData(element) {

        $("#father_fname").val($(element).find(".father-first").html());
        $("#father_lname").val($(element).find(".father-last").html());
        $("#father_phone").val($(element).find(".father-phone").html());
        $("#father_job").val($(element).find(".father-job").html());
        $("#father_id").val($(element).attr("id"));
        setDataToFathersSuggestionsList([]);
        $("#exist-father-account").click();
    }

    function checkNearest(element) {
        var closestRadio = $(element).parent().find("input[type=radio]");
        closestRadio.attr('id', new Date().getTime())
        $(element).attr('for', closestRadio.attr('id'));
        $("input[name='" + closestRadio.attr('name') + "']").each(function(index, elmnt) {
            elmnt.removeAttribute('checked');
        });
        closestRadio.attr('checked', true);
        console.log(closestRadio);
    }


    function stageLevels(stage_id) {
        var jqxhr = $.ajax({
                url: "<?php echo e(route('admin.stage.levels')); ?>",
                method: "GET",
                timeout: 0,
                data: {
                    stage_id: stage_id
                }
            })
            .done(function(response) {
                setLevelsOptions(response.data);
                console.log(response);
            })
            .fail(function(response) {
                console.log(response);
                toastr.error(response.responseJSON.msg, '<?php echo e(trans("general.error")); ?>');
            });

    }

    function setLevelsOptions(data) {
        var levelSelect = $('#level_to_study');
        levelSelect.html('');
        levelSelect.append($('<option>', {
            value: '',
            text: '--', 

        }));
        $.each(data, function(index, val) {
            levelSelect.append($('<option>', {
                value: val.id,
                text: val.title
            }));
        });

        levelSelect.val("<?php echo e(old('level_to_study')); ?>");
    }


    function levelDivisions(level_id) {
        var jqxhr = $.ajax({
                url: "<?php echo e(route('admin.level.divisions')); ?>",
                method: "GET",
                timeout: 0,
                data: {
                    level_id: level_id
                }
            })
            .done(function(response) {
                setDivisionsOptions(response.data);
                console.log(response);
            })
            .fail(function(response) {
                console.log(response);
                toastr.error(response.responseJSON.msg, '<?php echo e(trans("general.error")); ?>');
            });

    }

    function setDivisionsOptions(data) {
        var divisionSelect = $('#division');
        divisionSelect.html('');
        divisionSelect.append($('<option>', {
            value: '',
            text: '--'
        }));
        $.each(data, function(index, val) {
            divisionSelect.append($('<option>', {
                value: val.id,
                text: val.title
            }));
        });

        divisionSelect.val("<?php echo e(old('division')); ?>");

    }
</script>

<?php $__env->stopPush(); ?>

<?php $__env->startPush('header'); ?>
<!-- <link rel="stylesheet" type="text/css" href="<?php echo e(url('design')); ?>/app-assets/vendors/css/forms/select/select2.min.css"> -->
<link rel="stylesheet" type="text/css" href="<?php echo e(url('design')); ?>/app-assets/vendors/css/pickers/flatpickr/flatpickr.min.css">

<?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\nobalaa-dev\Desktop\New folde2r\portal\resources\views/admin/students/students-create.blade.php ENDPATH**/ ?>