<?php $__env->startSection('title', $title); ?>
<?php $__env->startSection('content'); ?>
<div class="container page-space">
    <?php echo $__env->make('front.partials.ad', ['slot' => 'list_top'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="home-catalogue-layout">
        <section class="home-catalogue-main">
            <div class="section-head">
                <div>
                    <h1><?php echo e($title); ?></h1>
                    <p class="section-subtitle"><?php echo e($sort === 'trending' ? 'Trending this week on TMDB.' : ($sort === 'latest_released' ? 'Newest releases first.' : ($sort === 'most_viewed' ? 'Most viewed titles first.' : 'Latest imported titles first.'))); ?></p>
                </div>
                <?php if($fromDate || $toDate || $sort !== 'trending'): ?>
                    <a class="clear-filter-link" href="<?php echo e($filterAction); ?>">Clear filters</a>
                <?php endif; ?>
            </div>

            <div class="grid cinema-grid" id="infiniteList" data-infinite-catalogue
                data-next-page-url="<?php echo e($items->nextPageUrl()); ?>"
                data-loading-message="Loading more <?php echo e(strtolower($title)); ?>..."
                data-finished-message="You have reached the end of <?php echo e(strtolower($title)); ?>.">
                <?php $__empty_1 = true; $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $x): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php echo $__env->make('front.partials.card', ['x' => $x, 'type' => $type], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="empty-state">No items found for these filters.</div>
                <?php endif; ?>
            </div>

            <?php if($items->hasMorePages()): ?>
                <div class="infinite-loader" data-infinite-loader aria-live="polite">
                    <span class="infinite-spinner" aria-hidden="true"></span>
                    <span data-loader-text>Scroll down to load more</span>
                </div>
                <div class="infinite-sentinel" data-infinite-sentinel aria-hidden="true"></div>
                <button class="infinite-retry" type="button" data-infinite-retry hidden>Try again</button>
            <?php elseif($items->isNotEmpty()): ?>
                <div class="infinite-finished">You have reached the end of <?php echo e(strtolower($title)); ?>.</div>
            <?php endif; ?>
        </section>

        <aside class="home-filter-sidebar" aria-label="<?php echo e($title); ?> sorting and date filter">
            <?php echo $__env->make('front.partials.catalogue-filter', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        </aside>
    </div>

    <?php echo $__env->make('front.partials.ad', ['slot' => 'list_bottom'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('front.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/megashopltd/moviedocks.com/resources/views/front/list.blade.php ENDPATH**/ ?>