<?php $__env->startSection('content'); ?>

    <main>

        <!-- Start restaurants_sec -->
        <section class="provider_pg provider_pg2 section pt-0">

            <div class="container">

                <div class="tab_wrapper imgs_tab" data-scroll-index="0">
                    <div class="col-lg-5">
                        <div class="mb-4 ">
                            <div class="txt">
                                <div class="d-flex align-items-center mb-3" >
                                    <h1 class="title fw-bold mb-0"><?php echo e($provider->descriptions()->name); ?></h1>
                                    <div class="txt_rating fs-6 ms-5 ">
                                        <b class="rate me-2 ">
                                            <i class="fa-solid fa-star"></i> <?php echo e($provider->rate); ?>

                                        </b>
                                        <span class="small"><b class="underline"><?php echo e($provider->rate_count); ?></b> <span class="underline">تقييم</span></span>
                                    </div>
                                </div>
                                <p class="p fs-6">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/loc-2.svg" class="icon icon-15 me-2" alt=""/> <?php echo e($provider->country->descriptions()->name); ?> <?php echo e($provider->city->descriptions()->name); ?> | <?php echo e($provider->descriptions()->address); ?>

                                </p>
                            </div>

                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-7">
                            <div class="swiper_box overflow_hidden">
                                <div class="swiper mySwiper2 swiper-container position-relative lg-slide-swiper mb-4">
                                    <div class="swiper-wrapper">
                                        <div class="swiper-slide">
                                            <div class="img-box">
                                                <img src="<?php echo e(asset($provider->photo)); ?>" alt="" class="lg-img"/>
                                            </div>
                                        </div>
                                        <?php $__currentLoopData = $provider->photos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div class="swiper-slide">
                                            <div class="img-box">
                                                <img src="<?php echo e(asset($photo->image)); ?>" alt="" class="lg-img"/>
                                            </div>
                                        </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </div>
                                    <div class="swiper-pagination"></div>
                                </div>
                                <div thumbsSlider="" class="swiper mySwiper sm-slide-swiper">
                                    <div class="swiper-wrapper">
                                        <div class="swiper-slide">
                                            <img src="<?php echo e(asset($provider->photo)); ?>" alt="" class="sm-bg-header"/>
                                        </div>
                                        <?php $__currentLoopData = $provider->photos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div class="swiper-slide">
                                            <img src="<?php echo e(asset($photo->image)); ?>" alt="" class="sm-bg-header"/>
                                        </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-5">
                            <div class="contact_item d-flex align-items-center">
                                <div class="map_box w-100">
                                    <iframe width="100%" height="265" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=<?php echo e($provider->latlng); ?>&hl=en-US&amp;z=14&amp;ie=UTF8&amp;iwloc=B&amp;output=embed"><a href="https://www.maps.ie/distance-area-calculator.html">measure distance on map</a></iframe>
                                </div>
                            </div>
                            <div class="contact_item d-flex align-items-center">
                                <div class="icon_outer">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/contact_tab_1.svg" class="icon icon-18" alt=""/>
                                </div>
                                <div class="txt">
                                    <p class="mb-2">رقم التواصل</p>
                                    <h5 class="data fs-6 mb-0"><?php echo e($provider->phone); ?></h5>
                                </div>
                            </div>
                            <div class="contact_item d-flex align-items-center">
                                <div class="icon_outer">
                                    <img src="<?php echo e(url('')); ?>/assets/web/images/icons/contact_tab_2.svg" class="icon icon-18" alt=""/>
                                </div>
                                <div class="txt">
                                    <p class="mb-2"> أوقات الدوام  </p>
                                    <h5 class="data fs-6 mb-0"><?php echo e(date('g a',strtotime($provider->start_time))); ?>- <?php echo e(date('g a',strtotime($provider->end_time))); ?></h5>
                                </div>
                                <?php if($provider->start_time >= date('H:i:s') && $provider->start_time <=date('H:i:s')): ?>
                                    <span class="badge "><?php echo e(__('web.open')); ?></span>
                                <?php else: ?>
                                    <span class="badge danger_badge"><?php echo e(__('web.close')); ?></span>
                                <?php endif; ?>
                            </div>
                            <div class="contact_item d-flex align-items-center">
                                <span class="label small contact_label ">  تواصل معنا    </span>
                                <div>
                                    <?php if($provider->facebook): ?> <a href="<?php echo e($provider->facebook); ?>" target="_blank" class="social_link mx-2"><img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-1.png" alt=""></a> <?php endif; ?>
                                    <?php if($provider->instagram): ?> <a href="<?php echo e($provider->instagram); ?>" target="_blank" class="social_link mx-2"><img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-2.png" alt=""></a><?php endif; ?>
                                    <?php if($provider->twitter): ?><a href="<?php echo e($provider->twitter); ?>" target="_blank" class="social_link mx-2"><img src="<?php echo e(url('')); ?>/assets/web/images/icons/socialmedia-3.png" alt=""></a><?php endif; ?>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="col-lg-10 mt-5">
                        <p class="det">
                            <?php echo $provider->descriptions()->description; ?>

                        </p>
                    </div>
                </div>

                <div class="tab_wrapper events_tab restaurants_sec" data-scroll-index="2">
                    <h1 class="fs-2 fw-bold mb-5"> الفعاليات    </h1>
                    <div class="swiper-container events_swiper pb-5">
                        <div class="swiper-wrapper">
                            <?php $__currentLoopData = $provider->events; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="swiper-slide">
                                    <?php echo $__env->make('web.pages.components.event.event',['event'=>$row], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div class="swiper-pagination"></div>
                    </div>
                </div>

                <div class="tab_wrapper rates_tab" data-scroll-index="4">
                    <h1 class="fs-2 fw-bold mb-5"> التقييمات    </h1>
                    <div class="swiper-container rates_swiper pb-5">
                        <div class="swiper-wrapper">
                            <?php $__currentLoopData = $provider->rates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="swiper-slide">
                                    <?php echo $__env->make('web.pages.components.rate.rate',['rate'=>$row], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div class="swiper-pagination"></div>
                    </div>
                    <?php if(\Auth::user()): ?>
                        <?php if($provider->rated() && \Auth::user()->role != 'provider'): ?>
                            <a href="#" class="butn primary_butn m-auto mt-5 py-3 rounded"  data-bs-toggle="modal" data-bs-target="#rateModal">
                                <img src="<?php echo e(url('')); ?>/assets/web/images/icons/rate-1.svg" class="icon icon-15 me-2" alt=""> إترك تعليقك
                            </a>
                        <?php endif; ?>
                    <?php endif; ?>
                </div>


            </div>
        </section>

    </main>


    <div class="modal joiningModal rateModal fade" id="rateModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog  modal-dialog-centered modal-lg">
            <div class="modal-content">
                <div class="modal-body py-5">
                    <form method="post" action="<?php echo e(url(getCurrentLocale().'/rate')); ?>" onsubmit="formAction(this)" class="col-lg-10 m-auto">
                        <?php echo csrf_field(); ?>
                        <input type="hidden" name="provider_id" value="<?php echo e($provider->id); ?>">
                        <h1 class="title fs-2 fw-bold text-center mb-5"><img src="<?php echo e(url('')); ?>/assets/web/images/icons/rate-1.svg" class="icon me-2" alt="">  إترك تعليقك    </h1>
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="stars-content mb-5">
                                    <div class="star-rating">
                                        <input type="radio" id="5-stars" name="rate" value="5" />
                                        <label for="5-stars" class="star"><i class="fa-solid fa-star"></i></label>
                                        <input type="radio" id="4-stars" name="rate" value="4" />
                                        <label for="4-stars" class="star"><i class="fa-solid fa-star"></i></label>
                                        <input type="radio" id="3-stars" name="rate" value="3" />
                                        <label for="3-stars" class="star"><i class="fa-solid fa-star"></i></label>
                                        <input type="radio" id="2-stars" name="rate" value="2" />
                                        <label for="2-stars" class="star"><i class="fa-solid fa-star"></i></label>
                                        <input type="radio" id="1-star" name="rate" value="1" />
                                        <label for="1-star" class="star"><i class="fa-solid fa-star"></i></label>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-12">
                                <div class="form-group mb-4">
                                    <textarea name="comment" rows="10" class="form-control" placeholder=" نص التقييم  "></textarea>
                                </div>
                            </div>
                        </div>


                        <button class="butn primary_butn m-auto mt-5 px-5 py-3"> إرسال  </button>
                    </form>
                </div>
            </div>
        </div>
    </div>


<?php $__env->startSection('inject_js'); ?>

    <script>
        let url_providers = <?php echo json_encode(url(getCurrentLocale())); ?>;
        let url_show_location = <?php echo json_encode(url(getCurrentLocale().'/show/location')); ?>;
        let url_show_event = <?php echo json_encode(url(getCurrentLocale().'/show/event')); ?>;
    </script>
    <script src="<?php echo e(url('')); ?>/assets/web/js/custom/homeAction.js"></script>

    <script>
        var swiper = new Swiper(".sm-slide-swiper", {
            // loop: true,
            slidesPerView: 2,
            spaceBetween: 0,
            freeMode: true,
            watchSlidesProgress: true,
            breakpoints: {
                768: {
                    slidesPerView: 4,
                },
                1024: {
                    slidesPerView: 6,
                },
            }
        });
        var swiper2 = new Swiper(".lg-slide-swiper", {
            // loop: true,
            // effect: 'fade',
            spaceBetween: 10,
            // autoplay: {
            //     delay: 2500,
            // },
            thumbs: {
                swiper: swiper,
            },
            pagination: {
                el: '.lg-slide-swiper .swiper-pagination',
                clickable: true
            },
        });
    </script>
<?php $__env->stopSection(); ?>

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

<?php echo $__env->make('web.layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/youdra/resources/views/web/pages/provider/provider.blade.php ENDPATH**/ ?>