<?php $__env->startSection('content'); ?>
    <section class="page-heading">
        <div class="container">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="<?php echo e(LaravelLocalization::getLocalizedURL(getCurrentLocale(), route('home'), [], true)); ?>"><?php echo e(__('main.home')); ?></a></li>
                    <li class="breadcrumb-item active" aria-current="page"> <?php echo e(__('halls.head')); ?> </li>
                </ol>
                <h3> <?php echo e(__('halls.head')); ?> </h3>
            </nav>
        </div>
        <img src="<?php echo e(asset('assets/web/images/page-heading-1.png')); ?>" alt="" class="pattern1">
        <img src="<?php echo e(asset('assets/web/images/page-heading-2.png')); ?>" alt="" class="pattern2">
        <img src="<?php echo e(asset('assets/web/images/page-heading-3.png')); ?>" alt="" class="pattern3">
    </section>
    <div class="searching pb-0" style="background-color: #fff;">
        <div class="container">
            <div class="inner">
                <form action="<?php echo e(route('hall.index')); ?>" method="get" class="form search_form">
                    <div class="item">
                        <img src="<?php echo e(asset('assets/web/images/icons/selectbox-4.svg')); ?>" class="icon" alt="">
                        <div class="form-group">
                            <select name="occasion_id" class="form-control search-select">
                                <option value=""><?php echo e(__('main.your_occasion')); ?></option>
                                <?php if(count($occasions)): ?>
                                    <?php $__currentLoopData = $occasions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $occasion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($occasion->id); ?>"><?php echo e($occasion->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </select>
                        </div>
                    </div>
                    <div class="item">
                        <img src="<?php echo e(asset('assets/web/images/icons/advances-search-2.svg')); ?>" class="icon" alt="">
                        <div class="form-group">
                            <select name="category_id" class="form-control search-select">
                                <option value="" ><?php echo e(__('main.type_of_place')); ?></option>
                                <?php if(count($categories)): ?>
                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </select>
                        </div>
                    </div>
                    <div class="item">
                        <img src="<?php echo e(asset('assets/web/images/icons/advances-search-3.svg')); ?>" class="icon" alt="">
                        <div class="form-group">
                            <select name="city_id" class="form-control search-select">
                                <option value="" ><?php echo e(__('main.city')); ?></option>
                                <?php if(count($cities)): ?>
                                    <?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($city->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </select>
                        </div>
                    </div>
                    <div class="item">
                        <img src="<?php echo e(asset('assets/web/images/icons/advances-search-6.svg')); ?>" class="icon" alt="">
                        <div class="form-group">
                            <select name="rate" class="form-control search-select">
                                <option value="" ><?php echo e(__('main.evaluate_stars')); ?></option>
                                <option value="5">5.0</option>
                                <option value="4">4.0</option>
                                <option value="3">3.0 </option>
                            </select>
                        </div>
                    </div>
                    <button class="submit-btn search_button"><img src="<?php echo e(asset('assets/web/images/icons/advances-search-4.svg')); ?>" class="icon" alt=""> </button>

                </form>
            </div>

        </div>
    </div>
    <section class="halls-sec">
        <div class="container halls_container">
            <div class="row">
                <?php if(count($halls)): ?>
                    <?php $__currentLoopData = $halls; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $hall): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="col-md-6 col-lg-4">
                            <div class="hall-card">
                                <div class="img-box">
                                    <a href="<?php echo e(route('hall.show', $hall->id)); ?>">
                                        <img src="<?php echo e(asset($hall->images[0])); ?>" alt="">
                                        <?php if($hall->rate): ?>
                                            <span class="rate-badge"><i class="far fa-star"></i> <?php echo e($hall->rate); ?></span>
                                        <?php endif; ?>
                                        <span class="badge"><?php echo e($hall->category_name); ?></span>
                                    </a>
                                </div>
                                <div class="card-body">
                                    <div class="prof-info">
                                        <img src="<?php echo e(asset($hall->provider_photo ?? 'assets/web/images/avatar.png')); ?>" alt="" class="prof_img">
                                        <div class="text">
                                            <span class="provider"><?php echo e(__('main.provider')); ?></span>
                                            <h6 class="name mb-0"><?php echo e($hall->provider_name); ?></h6>
                                        </div>
                                    </div>
                                    <h5 class="headline"><?php echo e($hall->hall_name); ?></h5>
                                    <p class="city-name"><img src="<?php echo e(asset('assets/web/images/icons/loc-blue.svg')); ?>" alt="" class="icon"> <?php echo e($hall->city_name); ?></p>
                                    <?php if($hall->reservation_type == 'person_count'): ?>
                                        <p class="price"><?php echo e(__('main.start_from')); ?> <span class="dir-l"><b><?php echo e($hall->booking_amount_per_person); ?> <?php echo e(__('main.sar')); ?></b></span>
                                        <?php echo e((__('main.per_person'))); ?>

                                    <?php endif; ?>
                                    <?php if($hall->reservation_type == 'days_count'): ?>
                                        <p class="price"><?php echo e(__('main.start_from')); ?> <span class="dir-l"><b><?php echo e($hall->booking_amount_per_day); ?> <?php echo e(__('main.sar')); ?></b></span>
                                        <?php echo e((__('main.per_day'))); ?>

                                    <?php endif; ?>
                                    <a href="<?php echo e(route('reservation.hallReservation', $hall->id)); ?>" class="link-btn my-3"> <?php echo e(__('main.book_now')); ?>  </a>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php echo e($halls->links('web.halls.pagination.paginate', ['paginator' => $halls])); ?>

                <?php else: ?>
                    <div class="alert alert-secondary text-danger text-center col-md-12"><?php echo e(__('members.no_data')); ?></div>
                <?php endif; ?>
            </div>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <script>
        let city_id = "<?php echo e(request()->query('city_id')); ?>",
            searchRoute = "<?php echo e(route('hall.index')); ?>";
    </script>
    <script>
        $(document).on('click', '.previous_hall_link, .next_hall_link, .search_button', async function (e) {
            e.preventDefault();
            let form = $('.search_form'),
                url = $(this).hasClass('search_button') ? form.attr('action') : $(this).attr('href'),
                data = $(this).hasClass('search_button') ? {occasion_id: $('select[name="occasion_id"]').val(), category_id:$('select[name="category_id"]').val(), city_id:$('select[name="city_id"]').val(), rate: $('select[name="rate"]').val()} : {};

            const response= await ajax({
                url,
                data,
                method: 'get'
            });

            if (response){
                $('.halls_container').html(response);
            }

        });
    </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/halls/index.blade.php ENDPATH**/ ?>