<?php if (isset($component)) { $__componentOriginalaa31ba7329e5fa178c3181014d0601ff = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalaa31ba7329e5fa178c3181014d0601ff = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.user.content','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('user.content'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title', null, []); ?> <?php echo e($data['title']); ?> <?php $__env->endSlot(); ?>
     <?php $__env->slot('head', null, []); ?> 
        <style>
            a.link_data {
                position: absolute;
                z-index: 1;
                right: 60px;
            }

            div.pointukar {
                background-color: red;
                z-index: 1;
                padding: 3px;
                text-align: center;
                color: white;
            }

            @media only screen and (max-width: 600px) {
                a.link_data {
                    position: absolute;
                    z-index: 1;
                    right: 15px;
                }

                div.pointukar {
                    background-color: red;
                    z-index: 1;
                    padding: 3px;
                    text-align: center;
                    color: white;
                    font-size: 10px;
                }
            }
        </style>
     <?php $__env->endSlot(); ?>
    <!-- Carousel Start -->
    <div class="container-fluid mb-3">
        <div class="row px-xl-5">
            <div class="col-lg-8 ">
                <div id="header-carousel" class="carousel slide carousel-fade mb-30 mb-lg-0" data-ride="carousel">
                    <ol class="carousel-indicators">
                        <?php
                            $i = 0;
                        ?>
                        <?php $__currentLoopData = $slid; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li data-target="#header-carousel" data-slide-to="<?php echo e($i); ?>"
                                class="<?php echo e($i == 0 ? 'active' : ''); ?>"></li>
                            <?php
                                $i++;
                            ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ol>
                    <div class="carousel-inner">
                        <?php $__currentLoopData = $slid; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="carousel-item position-relative <?php echo e($no == 1 ? 'active' : ''); ?>"
                                style="height: 430px; background-color: black">
                                <a href="<?php echo e($s->link); ?>">
                                    <img class="position-absolute w-100 h-100"
                                        src="<?php echo e(asset('/storage/banner/' . $s->gambar)); ?>" style="object-fit: cover; ">
                                    <div
                                        class="carousel-caption d-flex flex-column align-items-center justify-content-center">
                                        <?php if($s->link != '#'): ?>
                                            <div class="p-3" style="max-width: 700px;">
                                                <h1
                                                    class="display-4 text-white mb-3 animate__animated animate__fadeInDown text-dark">
                                                    <?php echo e($s->judul); ?></h1>
                                                <p class="mx-md-5 px-5 animate__animated animate__bounceIn text-dark">
                                                    Lorem
                                                    <?php echo e($s->isi); ?>

                                                </p>
                                                <a class="btn btn-outline-danger py-2 px-4 mt-3 animate__animated animate__fadeInUp"
                                                    href="#">Cek Sekarang</a>
                                            </div>
                                        <?php endif; ?>
                                    </div>
                                </a>
                            </div>
                            <?php
                                $no++;
                            ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                    </div>
                </div>
            </div>
            <div class="col-lg-4">
                <?php $__currentLoopData = $ban_atas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $b): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="product-offer mb-30" style="height: 200px;">
                        <img class="img-fluid" src="<?php echo e(asset('/storage/banner/' . $b->gambar)); ?>" alt="">
                        <?php if($b->link != '#'): ?>
                            <div class="offer-text">
                                <h6 class="text-white text-uppercase"><?php echo e($b->isi); ?></h6>
                                <h3 class="text-white mb-3"><?php echo e($b->judul); ?></h3>
                                <a href="<?php echo e($b->link); ?>" class="btn btn-danger">Cek Sekarang</a>
                            </div>
                        <?php endif; ?>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </div>
    <!-- Carousel End -->





    <!-- Products Start -->
    <div class="container-fluid pt-5 pb-3" id="prod">
        <a href="/list-produk" class="btn btn-danger link_data">Cek Produk <i
                class="fa fa-angle-double-right ml-3"></i></a>
        <h2 class="section-title position-relative text-uppercase mx-xl-5 mb-4"><span
                class="bg-secondary pr-3">Produk</span></h2>
        <div class="row px-xl-5">

            <?php $__empty_1 = true; $__currentLoopData = $produk; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="col-lg-2 col-md-4 col-sm-6 pb-1">
                    <div class="product-item bg-light mb-4">
                        <div class="product-img position-relative overflow-hidden">
                            <?php if($p->gambar != null): ?>
                                <img class="img-fluid w-100" src="<?php echo e(asset('/storage/produk/' . $p->gambar)); ?>"
                                    alt="produk">
                            <?php else: ?>
                                <img alt="produk" class="img-fluid w-100"
                                    src="<?php echo e(asset('storage/produk/produk.jpg')); ?>">
                            <?php endif; ?>
                            <div class="product-action">

                                <a class="btn btn-outline-dark btn-square" href="detail/<?php echo e($p->link_produk); ?>"><i
                                        class="fa fa-search"></i></a>
                            </div>
                        </div>
                        <div class="text-center py-4">
                            <a class="h6 text-decoration-none text-truncate" href="detail/<?php echo e($p->link_produk); ?>">
                                <?php if(strlen($p->nm_produk) > 17): ?>
                                    <?php echo e(substr($p->nm_produk, 0, 25)); ?>...
                                <?php else: ?>
                                    <?php echo e($p->nm_produk); ?>

                                <?php endif; ?>
                            </a>
                            <div class="d-flex align-items-center justify-content-center mt-2">
                                <?php if($p->diskon == 0): ?>
                                    <h5>Rp. <?php echo e(number_format($p->harga_jual, 0, ',', '.')); ?></h5>
                                <?php else: ?>
                                    <h5>Rp.
                                        <?php echo e(number_format($p->harga_jual - ($p->harga_jual * $p->diskon) / 100, 0, ',', '.')); ?>

                                    </h5>
                                    <h6 class="text-muted ml-2"><del>Rp.
                                            <?php echo e(number_format($p->harga_jual, 0, ',', '.')); ?></del></h6>
                                <?php endif; ?>


                            </div>
                            <?php
                                $cek = stok($p->id) - terjual($p->id);
                            ?>
                            <button class="btn  btn-block <?php echo e($cek == 0 ? 'btn-default disabled' : 'btn-info beli'); ?>"
                                data-kd="<?php echo e($p->kd_produk); ?>">
                                <?php echo $cek == 0 ? 'Stok Habis' : '<i class="fa fa-cart-plus"></i> Masukan keranjang'; ?>

                            </button>
                        </div>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <?php endif; ?>

        </div>
    </div>
    <!-- Products End -->


    <!-- Offer Start -->
    <div class="container-fluid pt-5 pb-3">
        <div class="row px-xl-5">
            <?php $__currentLoopData = $ban_bawah; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $b): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="col-md-6">
                    <div class="product-offer mb-30" style="height: 300px;">
                        <img class="img-fluid" src="<?php echo e(asset('/storage/banner/' . $b->gambar)); ?>" alt="">
                        <?php if($b->link != '#'): ?>
                            <div class="offer-text">
                                <h6 class="text-white text-uppercase"><?php echo e($b->isi); ?></h6>
                                <h3 class="text-white mb-3"><?php echo e($b->judul); ?></h3>
                                <a href="<?php echo e($b->link); ?>" class="btn btn-danger">
                                    Cek Sekarang</a>
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>



        </div>
    </div>
    <!-- Offer End -->





    <!-- Vendor Start -->
    <div class="container-fluid py-5">
        <a href="/list-item" class="btn btn-warning link_data">Cek Hadiah <i
                class="fa fa-angle-double-right ml-3"></i></a>
        <h2 class="section-title position-relative text-uppercase mx-xl-5 mb-4"><span class="bg-secondary pr-3">Tukar
                Poin
            </span></h2>

        <div class="row px-xl-5">
            <div class="col">
                <div class="owl-carousel vendor-carousel">
                    <?php $__empty_1 = true; $__currentLoopData = $item; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <div class="bg-light p-4 ">
                            <img src="<?php echo e(asset('/storage/produk/' . $i->gambar)); ?>" alt="">
                            <div class="pointukar">
                                <?php echo e($i->poin); ?> Poin
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <?php endif; ?>


                </div>
            </div>
        </div>
    </div>
    <!-- Vendor End -->

     <?php $__env->slot('foot', null, []); ?> 

     <?php $__env->endSlot(); ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalaa31ba7329e5fa178c3181014d0601ff)): ?>
<?php $attributes = $__attributesOriginalaa31ba7329e5fa178c3181014d0601ff; ?>
<?php unset($__attributesOriginalaa31ba7329e5fa178c3181014d0601ff); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalaa31ba7329e5fa178c3181014d0601ff)): ?>
<?php $component = $__componentOriginalaa31ba7329e5fa178c3181014d0601ff; ?>
<?php unset($__componentOriginalaa31ba7329e5fa178c3181014d0601ff); ?>
<?php endif; ?>
<?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/e-CommerceLv11/resources/views/home/home.blade.php ENDPATH**/ ?>