<?php $__env->startSection('content'); ?>
    <section class="gallery-sec gallery-pg">
        <div class="container">
            <!--<div class="row">-->
                <?php if(count($occasions)): ?>
                    <div class="row media_container">
                        <?php $__currentLoopData = $occasions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $occasion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-lg-4 col-md-6">
                                <a <?php if($occasion->url): ?> href="<?php echo e($occasion->url); ?>" <?php else: ?> href="<?php echo e(asset($occasion->image)); ?>" <?php endif; ?> data-fancybox>
                                    <div class="gallery_card">
                                        <img src="<?php echo e(asset($occasion->image)); ?>" alt="" class="main-img"/>
                                        <span class="video-icon"><i class="fas fa-play-circle"></i></span>
                                        <h6 class="title"><?php echo e($occasion->title); ?></h6>
                                    </div>
                                </a>
                               
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                    <div class="col-md-12">
                        <a href="#" class="more-butn mt-4 show_more_link"> <i class="fas fa-spinner"></i><?php echo e(__('main.show_more')); ?></a>
                    </div>
                <?php endif; ?>
            <!--</div>-->
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('inner_js'); ?>
    <script>
        let showMoreMediaRoute = "<?php echo e(route('showMoreMedia')); ?>",
            noMoreMediaAlert = "<?php echo e(__('occasions.no_more_media')); ?>",
            skip = 0;

        $('.show_more_link').click(async function (e) {
            e.preventDefault();
            skip = skip + 6;

            if(!$(this).hasClass('show_more_link')){
                return false;
            }
            let url = showMoreMediaRoute,
                data = {skip: skip},
                method = 'get';

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

            if(!response){
                $(this).toggleClass('w-50 show_more_link').html(noMoreMediaAlert);
            }
            if (response){
                $('.media_container').append(response);
            }

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

<?php echo $__env->make('web.layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/balyomhost/public_html/fulath/resources/views/web/media_center/event_conference_exhibition/index.blade.php ENDPATH**/ ?>