<?php $__env->startSection('css'); ?>
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="<?php echo e(asset('assets/web/css/lib/image-uploader.min.css')); ?>" >

    <link rel="stylesheet" href="<?php echo e(asset('assets/admin/css/lib/jquery-ui.css')); ?>" />
    <link rel="stylesheet" href="<?php echo e(asset('assets/admin/css/lib/jquery-ui.theme.css')); ?>" />


    <style>
        .highlight{
            background: #FC0 !important;
        }
    </style>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <section class="profile-pg profile-provider">
        <div class="container">
            <div class="row">
                <div class="col-lg-12 m-auto">
                    <div class="tab-content" id="v-pills-tabContent">
                        <div class="tab-pane fade show active" id="v-pills-tab6" role="tabpanel" aria-labelledby="v-pills-tab6-tab">
                            <div class="tab-wrapper addHall">
                                <div class="tab-content" id="nav-tabContent">
                                    <div class="row">
                                        <div class="col-md-9 m-auto">
                                            <div class="form-wrapper mt-5">
                                                <form class="form-row add_edit_hall_form" method="post" action="<?php echo e(route('provider.AddEditHall', $myHall->id)); ?>" enctype="multipart/form-data">
                                                    <div class="col-md-12">
                                                        <div class="form-group">
                                                            <input name="name_<?php echo e($local); ?>" type="text" class="form-control" autocomplete="off" autofocus required value="<?php echo e($myHall->hall_name); ?>"/>
                                                            <label class="floating-label"><?php echo e(__('halls.name')); ?></label>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="form-group">
                                                            <select name="is_offer" class="form-control">
                                                                <option value=""><?php echo e(__('halls.is_offer')); ?></option>
                                                                <option <?php echo e(($myHall->is_offer ?? null) == 1 ? 'selected': ''); ?> value="1"><?php echo e(__('halls.yes')); ?></option>
                                                                <option <?php echo e(($myHall->is_offer ?? null) == 0 ? 'selected': ''); ?> value="0"><?php echo e(__('halls.no')); ?></option>
                                                            </select>
                                                            <label class="floating-label"><?php echo e(__('halls.is_offer')); ?> </label>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="form-group">
                                                            <div class="input-images"></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12 mb-4">
                                                        <div class="from-group d-flex justify-content-center">
                                                            <?php if($myHall->images): ?>
                                                                <?php $__currentLoopData = $myHall->images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <img style="width:100px; margin: 0 10px" src="<?php echo e(asset($image)); ?>" alt="">
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <select name="reservation_way" class="form-control" autocomplete="off" autofocus required>
                                                                <option value=""><?php echo e(__('halls.reservation_way')); ?></option>
                                                                <option <?php echo e($myHall->reservation_way == 'direct' ? 'selected' : ''); ?> value="direct"><?php echo e(__('halls.direct')); ?></option>
                                                                <option <?php echo e($myHall->reservation_way == 'accept_request' ? 'selected' : ''); ?> value="accept_request"><?php echo e(__('halls.accept_request')); ?></option>
                                                            </select>
                                                            <label class="floating-label"><?php echo e(__('halls.reservation_way')); ?> </label>

                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <select name="category_id" class="form-control">
                                                                <option value=""><?php echo e(__('halls.hall_category_id')); ?></option>
                                                                <?php if(count($categories)): ?>
                                                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                        <option <?php echo e($myHall->category_id == $category->id ? 'selected': ''); ?> value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                <?php endif; ?>
                                                            </select>
                                                            <label class="floating-label"><?php echo e(__('halls.hall_category_id')); ?></label>
                                                        </div>
                                                    </div>
                                                    <div class="card p-3 mb-3 col-lg-12">
                                                        <label><?php echo e(__('halls.occasions')); ?> </label>
                                                        <div class="row card-body">
                                                            <?php if(count($occasions)): ?>
                                                                <?php $__currentLoopData = $occasions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $occasion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <div class="col-md-4">
                                                                        <div class="custom-control custom-checkbox">
                                                                            <input type="checkbox" <?php echo e(in_array($occasion->id, $myHall['occasions'] ?? []) ? 'checked' : ''); ?> value="<?php echo e($occasion->id); ?>" class="custom-control-input" id="occasions_<?php echo e($occasion->id); ?>" name="occasions[]">
                                                                            <label class="custom-control-label" for="occasions_<?php echo e($occasion->id); ?>"> <?php echo e($occasion->name); ?></label>
                                                                        </div>
                                                                    </div>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                                <input type="number" min="1" class="form-control" name="capacity" placeholder="<?php echo e(__('halls.capacity')); ?>" value='<?php echo e($myHall->capacity ?? ""); ?>' autofocus required/>
                                                                <label class="floating-label"><?php echo e(__('halls.capacity')); ?></label>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                                <input type="number" min="1" class="form-control" name="total_capacity" placeholder="<?php echo e(__('halls.total_capacity')); ?>" value='<?php echo e($myHall->total_capacity ?? ""); ?>'/>
                                                                <label class="floating-label"><?php echo e(__('halls.total_capacity')); ?> </label>

                                                            </div>
                                                        </div>
                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                                <input type="number" min="1" class="form-control" name="min_capacity" placeholder="<?php echo e(__('halls.min_capacity')); ?>" value='<?php echo e($myHall->min_capacity ?? ""); ?>'/>
                                                                <label class="floating-label"><?php echo e(__('halls.min_capacity')); ?> </label>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-6">
                                                            <div class="form-group">
                                                                <select name="reservation_type" class="form-control">
                                                                    <option <?php echo e($myHall->reservation_type == 'person_count' ? 'selected' : ''); ?> value="person_count"><?php echo e(__('halls.person_count')); ?></option>
                                                                    <option <?php echo e($myHall->reservation_type == 'days_count' ? 'selected' : ''); ?> value="days_count"><?php echo e(__('halls.days_count')); ?></option>
                                                                </select>
                                                                <label class="floating-label"><?php echo e(__('halls.reservation_type')); ?></label>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-6 booking_amount_per_person">
                                                            <div class="form-group">
                                                                <input type="number" min="1" class="form-control" name="booking_amount_per_person" placeholder="<?php echo e(__('halls.booking_amount_per_person')); ?>" value='<?php echo e($myHall->booking_amount_per_person ?? ""); ?>'/>
                                                                <label class="floating-label"><?php echo e(__('halls.booking_amount_per_person')); ?> </label>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-6 d-none booking_amount_per_day">
                                                            <div class="form-group">
                                                                <input type="number" min="1" class="form-control" name="booking_amount_per_day" placeholder="<?php echo e(__('halls.booking_amount_per_day')); ?>" value='<?php echo e($myHall->booking_amount_per_day ?? ""); ?>'/>
                                                                <label class="floating-label"><?php echo e(__('halls.booking_amount_per_day')); ?> </label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="locForm">
                                                            <h5 class="loc_title"><img src="<?php echo e(asset('assets/web/images/icons/loc-blue.svg')); ?>" alt=""><?php echo e(__('halls.hall_location')); ?></h5>
                                                            <div class="map-box mt-4 mb-4">
                                                                <iframe width="100%" height="250" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?width=100%25&amp;height=600&amp;hl=en&amp;q=1%20Grafton%20Street,%20Dublin,%20Ireland+(My%20Business%20Name)&amp;t=&amp;z=14&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"></iframe>
                                                            </div>
                                                            <div class="row mt-1">

                                                                <div class="col-md-4">
                                                                    <div class="form-group">
                                                                        <select name="region_id" class="form-control">
                                                                            <option value=""><?php echo e(__('halls.region_id')); ?></option>
                                                                            <?php if(count($regions)): ?>
                                                                                <?php $__currentLoopData = $regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $region): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                    <option <?php echo e(($myHall->region_id ?? null) == $region->id ? 'selected': ''); ?> value="<?php echo e($region->id); ?>"><?php echo e($region->name); ?></option>
                                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                            <?php endif; ?>
                                                                        </select>
                                                                        <label class="floating-label"> <?php echo e(__('halls.region_id')); ?></label>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="form-group">
                                                                        <select name="city_id" class="form-control">
                                                                            <option value=""><?php echo e(__('halls.city_id')); ?></option>
                                                                            <?php if(count($cities)): ?>
                                                                                <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                    <option <?php echo e(($myHall->city_id ?? null) == $city->id ? 'selected': ''); ?> value="<?php echo e($city->id); ?>"><?php echo e($city->name); ?></option>
                                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                            <?php endif; ?>
                                                                        </select>
                                                                        <label class="floating-label"> <?php echo e(__('halls.city_id')); ?></label>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="form-group">
                                                                        <select name="sector_id" class="form-control">
                                                                            <option value=""><?php echo e(__('halls.sector_id')); ?></option>
                                                                            <?php if(count($sectors)): ?>
                                                                                <?php $__currentLoopData = $sectors; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sector): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                    <option <?php echo e(($myHall->sector_id ?? null) == $sector->id ? 'selected': ''); ?> value="<?php echo e($sector->id); ?>"><?php echo e($sector->name); ?></option>
                                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                            <?php endif; ?>
                                                                        </select>
                                                                        <label class="floating-label"> <?php echo e(__('halls.sector_id')); ?></label>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-12">
                                                                    <div class="form-group">
                                                                        <input type="text" class="form-control" name="street" placeholder="<?php echo e(__('halls.street')); ?>" value='<?php echo e($myHall->street ?? ""); ?>'/>
                                                                        <label class="floating-label"><?php echo e(__('halls.street')); ?></label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="addService service_container">
                                                            <?php if(is_array($myHall->added_services) && count($myHall->added_services)): ?>
                                                                <?php $__currentLoopData = $myHall->added_services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <div class="deleted_service">
                                                                        <div class="in-flex justify-content-between">
                                                                            <?php if($loop->iteration != 1): ?>
                                                                                <a href="#" class="delete_service"><i class="fa fa-trash text-danger"></i></a>
                                                                            <?php endif; ?>
                                                                                <h5 class="loc_title mb-4"><?php echo e(__('halls.added_services')); ?></h5>
                                                                                <button class="addAnother btn add_service" type="button"><img src="<?php echo e(asset('assets/web/images/icons/profile/add.svg')); ?>" alt=""></button>
                                                                        </div>
                                                                        <div class="row mt-1">
                                                                            <div class="col-md-6">
                                                                                <div class="form-group">
                                                                                    <input name="added_services_name[]" type="text" class="form-control" autocomplete="off" autofocus required value="<?php echo e($service->name); ?>"/>
                                                                                    <label class="floating-label"><?php echo e(__('halls.added_services_name')); ?></label>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-6">
                                                                                <div class="form-group">
                                                                                    <input name="added_services_price[]" type="number" min="1" class="form-control" autocomplete="off" autofocus required value="<?php echo e($service->price); ?>"/>
                                                                                    <label class="floating-label"> <?php echo e(__('halls.added_services_price')); ?></label>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-12">
                                                                                <div class="form-group">
                                                                                    <textarea name="added_services_description[]" class="form-control" rows="2" autocomplete="off" autofocus required ><?php echo e($service->description); ?></textarea>
                                                                                    <label class="floating-label"><?php echo e(__('halls.added_services_description')); ?></label>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-12">
                                                                                <div class="form-group file-input-group">
                                                                                    <div class="wrap">
                                                                                        <div class="file">
                                                                                            <div class="added_service_input file__input" id="file__input">
                                                                                                <input type="hidden" name="old_added_services_image[]" value="<?php echo e($service->image); ?>">
                                                                                                <input class="file__input--file added_services_image" id="customAddedServiceImageFile_<?php echo e($loop->iteration); ?>" type="file" multiple="multiple" name="added_services_image[]"/>
                                                                                                <label class="file__input--label" for="customAddedServiceImageFile_<?php echo e($loop->iteration); ?>" data-text-btn="<?php echo e(__('members.select')); ?>">    <?php echo e(__('halls.added_services_image')); ?>  :</label>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </div>
                                                    </div>
                                                    <div class="card col-lg-12 p-3 mb-3">
                                                        <label><?php echo e(__('halls.available_dates')); ?> </label>
                                                        <div class="available_dates_container">
                                                            <?php if(is_array($myHall->available_dates) && count($myHall->available_dates)): ?>
                                                                <?php $__currentLoopData = $myHall->available_dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $availableDate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <div class="deleted_available_dates_container row flex-row-reverse justify-content-between align-items-center align-content-center">
                                                                        <div class="form-group col-md-5">
                                                                            <div class="custom-control custom-checkbox">
                                                                                <div class="discount_dates_container d-flex justify-content-start align-content-center align-items-center">
                                                                                    <input type="checkbox" <?php echo e($availableDate['discount'] ? 'checked' : ''); ?>  value="1" class="custom-control-input discount_dates_input" id="discount_dates_<?php echo e($loop->iteration); ?>">
                                                                                    <label class="custom-control-label col-md-4" for="discount_dates_<?php echo e($loop->iteration); ?>"> <?php echo e(__('halls.discount_dates')); ?></label>
                                                                                    <?php if($availableDate['discount_percentage'] && $availableDate['discount']): ?>
                                                                                        <input type="number" min="1" pattern="/[1-9]/" class="discount_percentage col-md-8 form-control" placeholder="<?php echo e(__('halls.discount_percentage')); ?>" value="<?php echo e($availableDate['discount_percentage']); ?>">
                                                                                    <?php endif; ?>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="form-group col-md-3">
                                                                            <input type="text" placeholder="<?php echo e(__('halls.available_dates_to')); ?>" name="available_dates_to[]" value="<?php echo e(date('m/d/Y', strtotime($availableDate['to']))); ?>" class="available_dates available_dates_to form-control">
                                                                        </div>
                                                                        <div class="form-group col-md-3">
                                                                            <input type="text" placeholder="<?php echo e(__('halls.available_dates_from')); ?>" name="available_dates_from[]" value="<?php echo e(date('m/d/Y', strtotime($availableDate['from']))); ?>" class="available_dates available_dates_from form-control">
                                                                        </div>
                                                                        <?php if($loop->iteration != 1): ?>
                                                                            <div class="form-group col-md-1">
                                                                                <a class="btn btn-danger delete_available_dates_link" href="#"><i class="fa fa-times"></i></a>
                                                                            </div>
                                                                        <?php else: ?>
                                                                            <div class="form-group col-md-1"></div>
                                                                        <?php endif; ?>

                                                                    </div>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php else: ?>
                                                                <div class="row flex-row-reverse justify-content-between align-items-center align-content-center">
                                                                    <div class="form-group col-md-5">
                                                                        <div class="custom-control custom-checkbox">
                                                                            <div class="discount_dates_container d-flex justify-content-start align-content-center align-items-center">
                                                                                <input type="checkbox" value="1" class="custom-control-input discount_dates_input" id="discount_dates_1">
                                                                                <label class="custom-control-label col-md-4" for="discount_dates_1"> <?php echo e(__('halls.discount_dates')); ?></label>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group col-md-3">
                                                                        <input type="text" placeholder="<?php echo e(__('halls.available_dates_to')); ?>" name="available_dates_to[]" value="" class="available_dates available_dates_to form-control">
                                                                    </div>
                                                                    <div class="form-group col-md-3">
                                                                        <input type="text" placeholder="<?php echo e(__('halls.available_dates_from')); ?>" name="available_dates_from[]" value="" class="available_dates available_dates_from form-control">
                                                                    </div>
                                                                    <div class="form-group col-md-1"></div>
                                                                </div>
                                                            <?php endif; ?>
                                                        </div>

                                                        <div class="row">
                                                            <div class="col-md-12">
                                                                <a href="#" class="btn btn-primary btn-sm btn-block add_available_dates_link"><i class="fa fa-plus"></i></a>
                                                            </div>
                                                        </div>
                                                    </div>















































                                                   <div class="col-md-12">
                                                       <div class="form-group">
                                                           <textarea name="description_<?php echo e($local); ?>" class="form-control" rows="7" autocomplete="off" autofocus required ><?php echo e($myHall->hall_description); ?></textarea>
                                                           <label class="floating-label"><?php echo e(__('halls.description')); ?></label>
                                                       </div>
                                                   </div>
                                                    <button class="submit-butn mt-4 add_edit_hall_button" type="submit"> <?php echo e(__('members.save')); ?></button>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <script src="<?php echo e(asset('assets/admin/js/lib/jquery-ui.js')); ?>"></script>

    <script>
        let getCityAndSectorRoute = "<?php echo e(route('provider.getCityAndSector')); ?>",
            addServiceIcon = "<?php echo e(asset('assets/web/images/icons/profile/add.svg')); ?>",
            region_name = "<?php echo e(__('members.region_id')); ?>",
            city_name = "<?php echo e(__('members.city_id')); ?>",
            sector_name = "<?php echo e(__('members.sector_id')); ?>",
            available_dates_to = "<?php echo e(__('halls.available_dates_to')); ?>",
            available_dates_from = "<?php echo e(__('halls.available_dates_from')); ?>",
            discount_dates = "<?php echo e(__('halls.discount_dates')); ?>",
            discount_percentage = "<?php echo e(__('halls.discount_percentage')); ?>",
            added_services = "<?php echo e(__('halls.added_services')); ?>",
            added_services_name = "<?php echo e(__('halls.added_services_name')); ?>",
            added_services_price = "<?php echo e(__('halls.added_services_price')); ?>",
            added_services_description = "<?php echo e(__('halls.added_services_description')); ?>",
            added_services_image = "<?php echo e(__('halls.added_services_image')); ?>",
            select = "<?php echo e(__('members.select')); ?>",
            upload_hall_image = "<?php echo e(__('halls.upload_hall_image')); ?>";
    </script>
    <script src="<?php echo e(asset('assets/web/js/provider.edit_hall.js')); ?>"></script>

    <script>

        let availableDatesFrom = [],
            availableDatesTo = [],
            availableDates = [];

        // $(document).ready(function(){
        $('.available_dates_from').each(function () {
            availableDatesFrom.push($(this).val());
        });
        $('.available_dates_to').each(function () {
            availableDatesTo.push($(this).val());
        });


        for (let i = 0; i < availableDatesFrom.length; i++) {
            let start = availableDatesFrom[i],
                end = new Date(availableDatesTo[i]),
                currentDate = new Date(start);
            while (currentDate <= end) {
                availableDates.push(new Date(currentDate));
                currentDate.setDate(currentDate.getDate() + 1);
            }
        }


        $('body').on('DOMNodeInserted', '.available_dates_container', function(e) {
            if ($(e.target).find('.available_dates')) {
                fireDatePicker('.available_dates');
            }
        });

        function fireDatePicker(selector) {
            let reservedDaysInput = $(selector);
            reservedDaysInput.change(function () {
                for (let i = 0; i < availableDates.length; i++) {
                    if (availableDates[i].toString() === new Date($(this).val()).toString()) {
                        $(this).val('');
                    }
                    // if($.inArray($(this).val(), availableDates) !== -1) {
                    //     $(this).val('');
                    // }
                }
            });

            reservedDaysInput.datepicker({
                beforeShowDay: reservedDays
            });

            function disableAllTheseDays(date) {

                // for (let i = 0; i < availableDatesFrom.length; i++) {
                //     if (new Date(availableDatesFrom[i]) > date || new Date(availableDatesTo[i]) < date) {
                //         return [true];
                //     }
                // }
                for (let i = 0; i < availableDates.length; i++) {
                    if (availableDates[i].toString() === date.toString()) {
                        return [false];
                    }
                }
                return [true];

                // let m = date.getMonth(), d = date.getDate(), y = date.getFullYear();
                // for (let i = 0; i < disabledDays.length; i++) {
                //     if($.inArray((m+1) + '/' + d + '/' + y,disabledDays) !== -1) {
                //         return [false];
                //     }
                // }
                //
                // return [true];
            }
            function highlightDays(date) {
                for (let i = 0; i < availableDates.length; i++) {
                    if (availableDates[i].toString() === date.toString()) {
                        return [true, 'highlight'];
                    }
                }
                return [true, ''];
                // for (let i = 0; i < disabledDays.length; i++) {
                //     if (new Date(disabledDays[i]).toString() === date.toString()) {
                //         return [true, 'highlight'];
                //     }
                // }
                // return [true, ''];

            }

            function reservedDays(date) {
                let clazz = '';
                let highLight = highlightDays(date);
                if (highLight[1] !== ''){
                    clazz = highLight[1];
                }

                let disableDays = disableAllTheseDays(date);
                let noWeekEnd = $.datepicker.noWeekends(date);
                return [(!disableDays[0] || !noWeekEnd[0]) ? false : true, clazz];
            }
        }

        fireDatePicker('.available_dates');



    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('web.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\meet\resources\views/web/members/providers/edit_hall.blade.php ENDPATH**/ ?>