<?php $__env->startSection('title', 'العقارات'); ?>
<?php if (isset($component)) { $__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e = $component; } ?>
<?php $component = App\View\Components\Dashboard\Css::resolve(['links' => [
    [
        'link' => 'products/products.css',
    ],
]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('dashboard.css'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Dashboard\Css::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e)): ?>
<?php $component = $__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e; ?>
<?php unset($__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e); ?>
<?php endif; ?>
<?php $__env->startSection('content'); ?>


    <?php if (isset($component)) { $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa = $component; } ?>
<?php $component = App\View\Components\Dashboard\LinksBar::resolve(['links' => [
        [
            'name' => 'العقارات',
        ],
    ],'buttons' => [
        [
            'name' => '<i class=\'fa-solid fa-plus\'></i> اضافة عقار جديد',
            'class' => 'btn-success',
            'link' => adminUrl('products/create'),
        ],
    ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('dashboard.links-bar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Dashboard\LinksBar::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa)): ?>
<?php $component = $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa; ?>
<?php unset($__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa); ?>
<?php endif; ?><!-- links bar -->


    <section id="products">
        <div class="row">
            <?php $__currentLoopData = $rows; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="col-xl-3 parents product-box">

                    <div class="box">
                        <img class="w-100 radius" src="<?php echo e(mediumAsset('products/' . $row->main_image)); ?>" alt="">
                        <h5 class="mt-3"><?php echo e($row->name); ?></h5>
                        <div class="place-info">
                            <img style="width:9px" src="<?php echo e(asset('assets/images/products/city.svg')); ?>" alt="">
                            <span class="mr-1 ml-3"><?php echo e($row->get_city->name); ?></span>

                            <img style="width:18px" src="<?php echo e(asset('assets/images/products/region.svg')); ?>" alt="">
                            <span class="mr-1"><?php echo e($row->get_region->name); ?></span>
                        </div>
                    </div>

                    <div class="btn-group">
                        <button class="dropdown-toggle radius" type="button" id="triggerId" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <i class="fa-solid fa-ellipsis"></i>
                        </button>
                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="triggerId">

                            <a class="dropdown-item"
                                href="<?php echo e(adminUrl('products/edit/' . $row->id . '?section=items')); ?>">عرض النماذج
                            </a>


                            <a class="dropdown-item"
                                href="<?php echo e(adminUrl('products/edit/' . $row->id . '?section=main-info')); ?>">تعديل
                            </a>

                            <form class="form d-inline-block dropdown-item form-status"
                                action="<?php echo e(route('product-update-display-status')); ?>" method="post">
                                <?php echo csrf_field(); ?>
                                <input type="hidden" class="id" name="id"
                                    value="<?php echo e(Crypt::encryptString($row->id)); ?>">
                                <?php echo method_field('PATCH'); ?>
                                <?php if($row->display_status > 0): ?>
                                    <button type="submit" data-status="0" class=" p-0 font-16 bg-transparent">إلغاء
                                        التنشيط</button>
                                <?php else: ?>
                                    <button type="submit" data-status="1" class="p-0 font-16 bg-transparent">تنشيط
                                        المنتج</button>
                                <?php endif; ?>
                            </form><!-- status -->

                            <div class="dropdown-divider"></div>
                            <form class="dropdown-item ajax-delete d-inline-block" action="<?php echo e(route('products-destroy')); ?>"
                                method="POST">
                                <?php echo method_field('DELETE'); ?>
                                <?php echo csrf_field(); ?>
                                <input type="hidden" class="id" name="id" value="<?php echo e($row->id); ?>">
                                <button type="submit" data-delete="هل انت متأكد من حذف : <?php echo e($row->name); ?>"
                                    class="p-0 font-16 bg-transparent">حذف
                                </button>
                            </form>
                        </div>
                    </div>

                </div><!-- col -->
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div><!-- row -->
    </section><!-- section -->


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

<?php echo $__env->make('dashboard.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\wjhatna\resources\views/dashboard/products/index.blade.php ENDPATH**/ ?>