
<?php $__env->startSection('title', 'محصولات مورد علاقه'); ?>

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

<div class="bread-crumb pt-3">
    <div class="container-fluid">
        <div class="content-box">
            <div class="container-fluid">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb mb-0">
                        <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>" class="font-14 text-muted">خانه</a></li>
                        <li class="breadcrumb-item"><a href="<?php echo e(route('panel.index')); ?>" class="font-14 text-muted">پنل کاربری</a></li>
                        <li class="breadcrumb-item active main-color-one-color font-14" aria-current="page">محصولات مورد علاقه</li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>
</div>

<div class="content">
    <div class="container-fluid">

        <div class="custom-filter d-lg-none d-block">
            <button class="btn btn-filter-float border-0 main-color-two-bg shadow-box px-4 rounded-3 position-fixed"
                style="z-index:999;bottom:80px;" type="button"
                data-bs-toggle="offcanvas" data-bs-target="#panelSideCanvas" aria-controls="panelSideCanvas">
                <i class="bi bi-list font-20 fw-bold text-white"></i>
                <span class="d-block font-14 text-white">منو</span>
            </button>
            <div class="offcanvas offcanvas-start" tabindex="-1" id="panelSideCanvas">
                <div class="offcanvas-header">
                    <h5 class="offcanvas-title">منو پنل</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
                </div>
                <div class="offcanvas-body">
                    <div class="panel-side">
                        <div class="content-box pb-0">
                            <div class="container-fluid">
                                <?php echo $__env->make('panel._sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="dashboard-panel">
            <div class="row gy-3">

                <div class="col-lg-3 d-lg-block d-none">
                    <div class="panel-side">
                        <div class="content-box pb-0">
                            <div class="container-fluid">
                                <?php echo $__env->make('panel._sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-lg-9">
                    <div class="content-box">
                        <div class="container-fluid">
                            <div class="title-panel mb-3">
                                <h6 class="font-16">محصولات مورد علاقه</h6>
                            </div>

                            <?php if(session('success')): ?>
                            <div class="alert alert-success font-13"><?php echo e(session('success')); ?></div>
                            <?php endif; ?>

                            <?php if($wishes->isEmpty()): ?>
                            <p class="text-muted font-14 text-center py-4">لیست علاقه‌مندی‌های شما خالی است.</p>
                            <?php else: ?>
                            <div class="row gy-3">
                                <?php $__currentLoopData = $wishes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $wish): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if(!$wish->product) continue; ?>
                                    <?php $product = $wish->product; ?>
                                    <div class="col-lg-4 col-sm-6">
                                        <div class="border rounded-3 p-2 h-100 d-flex flex-column">
                                            <a href="<?php echo e(route('product.show', $product->slug)); ?>" class="text-center mb-2">
                                                <?php if($product->featured_image): ?>
                                                <img src="<?php echo e(asset('uploads/products/' . $product->featured_image)); ?>"
                                                     class="img-fluid rounded-3" style="max-height:150px" alt="<?php echo e($product->title); ?>">
                                                <?php else: ?>
                                                <img src="<?php echo e(asset('theme/assets/image/product/wach1.jpg')); ?>"
                                                     class="img-fluid rounded-3" style="max-height:150px" alt="<?php echo e($product->title); ?>">
                                                <?php endif; ?>
                                            </a>
                                            <a href="<?php echo e(route('product.show', $product->slug)); ?>"
                                               class="text-decoration-none text-dark font-13 fw-bold mb-2 text-overflow-2 flex-grow-1">
                                                <?php echo e($product->title); ?>

                                            </a>
                                            <form method="POST" action="<?php echo e(route('panel.wishes.destroy', $product->slug)); ?>">
                                                <?php echo csrf_field(); ?>
                                                <?php echo method_field('DELETE'); ?>
                                                <button type="submit" class="btn btn-sm btn-outline-danger w-100 rounded-3 font-12">
                                                    <i class="bi bi-trash me-1"></i>حذف از علاقه‌مندی‌ها
                                                </button>
                                            </form>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                            <?php if($wishes->hasPages()): ?>
                            <div class="d-flex justify-content-center mt-4">
                                <?php echo e($wishes->links()); ?>

                            </div>
                            <?php endif; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>

            </div>
        </div>

    </div>
</div>

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

<?php echo $__env->make('site.layouts.site-layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/louishop/public_html/engine/resources/views/panel/wishes/index.blade.php ENDPATH**/ ?>