<?php if(!empty($advertisements)): ?>
    <?php
        $count = $advertisements->where('position', 2)->count();
    ?>
    <div class="container py-2">
        <div class="row">
            <?php $__currentLoopData = $advertisements->where('position', 2); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $advertisement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="<?php echo e($count == 1 ? 'col-12 col-sm-12 col-md-12' : ($count == 2 ? 'col-12 col-sm-12 col-md-6' : 'col-12 col-sm-12 col-md-4')); ?> bg-white rounded-2 py-2">
                    <?php if($advertisement->type == 1): ?>
                        <a href="<?php echo e($advertisement->url); ?>" target="_blank"><img src="<?php echo e($advertisement->image); ?>" alt="Advertisement Image"></a>
                    <?php elseif($advertisement->type == 2): ?>
                        <iframe width="100%" height="100%"  src="https://www.youtube.com/embed/<?php echo e($advertisement->video); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
                    <?php else: ?>
                        <?php echo $advertisement->content; ?>

                    <?php endif; ?>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
<?php endif; ?><?php /**PATH /home/apleusbj/shopping.apleefix.com/resources/views/frontend/partial/index/advertisement/home_bottom.blade.php ENDPATH**/ ?>