<?php 
    $cart = Session::get('cart');
?>
<div class="row col-md-12">
<?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $status = 0; ?>
    <div class="col-lg-2 col-md-4 col-sm-6 col-xs-3 col-6 bg pos-item p-5">
        <div class="thumbnail">

            <div class="caption" style="background-size: cover;background-image: url('/assets/images/resize/768x768/<?php echo e($item->feature); ?>');">

                <center><h4 class="text-danger"><b><?php echo e($item->item_house); ?></b></h4>
                <p class="text-blue"><b><?php echo e($item->item_price); ?>$</b></p>
                <p class="text-blue inven-name"><b>Stock : <?php echo e($item->inv_name); ?></b></p></center>
                <?php if($item->block_status==2): ?>
                    <p class="btn-holder"><span data-id="<?php echo e($item->id); ?>" class="btn btn-default btn-block text-center txt-danger fa fa-times" role="button"> Not Available</span> </p>
                    <p class="btn-holder"><span data-id="<?php echo e($item->id); ?>" class="btn btn-block btn-default text-center txt-warning" role="button" data-toggle="tooltip" data-placement="top" title="Blocked By :<?php echo e($item->user); ?>"> BLOCKED</span> </p>
                <?php else: ?>
                    <?php if(!$cart): ?>
                    <p class="btn-holder"><span data-id="<?php echo e($item->id); ?>" class="btn btn-default btn-block text-center btn-add-to-cart" role="button">Add To Cart</span> </p>
                    <?php else: ?>
                        <?php $__currentLoopData = $cart; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item_cart): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <?php if($item_cart['item_id']==$item->id): ?>
                                <p class="btn-holder"><span data-id = "<?php echo e($item->id); ?>" class="btn btn-danger btn-block text-center" role="button">Added To Cart</span> </p>
                                <?php $status = 1 ?>
                            <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php if($status != 1): ?>
                        <p class="btn-holder"><span data-id="<?php echo e($item->id); ?>" class="btn btn-default btn-block text-center btn-add-to-cart" role="button">Add To Cart</span> </p>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php if(Auth::user()->block_permission==1): ?>
                        <p class="btn-holder"><span data-id="<?php echo e($item->id); ?>"  data-hour="<?php echo e($item->item_block_time); ?>" class="btn btn-block btn-default text-center btn-block-item" role="button">Block Item</span> </p>
                    <?php endif; ?>
                <?php endif; ?>
            </div>
        </div>
    </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php echo $data->render(); ?>

<style>
    .thumbnail {
        display: block;
        padding: 0px !important;
        margin-bottom: 15px !important;
        line-height: 1.42857143;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        -webkit-transition: border .2s ease-in-out;
        -o-transition: border .2s ease-in-out;
        transition: border .2s ease-in-out;
    }
    .h4, .h5, .h6, h4, h5, h6 {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
    }
</style>