<?php if(count($carts)): ?>
    <div class="table-responsive">
        <table class="table mt-5">
            <thead>
            <tr>
                <th><?php echo e(__('web.product_image')); ?></th>
                <th><?php echo e(__('web.product_name')); ?></th>
                <?php if($route == 'cart'): ?>
                    <th><?php echo e(__('web.product_code')); ?></th>
                <?php endif; ?>
                <th><?php echo e(__('web.quantity')); ?></th>
                <th><?php echo e(__('web.cost')); ?></th>
                <?php if($route == 'cart'): ?>
                    <?php if($settings['tax_valid']): ?>
                        <th><?php echo e(__('web.tax')); ?></th>
                    <?php endif; ?>
                <?php endif; ?>
                <th><?php echo e(__('web.total')); ?></th>
                <?php if($route == 'cart'): ?>
                    <th></th>
                <?php endif; ?>
            </tr>
            </thead>
            <tbody>
            <?php $__currentLoopData = $carts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr class="cart_card_row">
                    <td>
                        <img src="<?php echo e($row['product_image']); ?>" class="prodImg" alt=""/>
                    </td>
                    <td><?php echo e($row['product_name']); ?></td>
                    <?php if($route == 'cart'): ?>
                        <td><?php echo e($row['product_code']); ?></td>
                    <?php endif; ?>
                    <td>
                        <div class="qty-container">
                            <button class=" btn-light" onclick="qtyDecrease(this)" action-id="<?php echo e(route('cart.update',$row['id'])); ?>" data-id="<?php echo e($row['id']); ?>" type="button"><i class="fa fa-minus"></i></button>
                            <input type="text" id="qty<?php echo e($row['id']); ?>" name="qty" value="<?php echo e($row['count']); ?>" data-id="<?php echo e($row['id']); ?>" count-id="<?php echo e($row['count']); ?>" class="input-qty"/>
                            <button class=" btn-light" onclick="qtyIncrease(this)" action-id="<?php echo e(route('cart.update',$row['id'])); ?>" data-id="<?php echo e($row['id']); ?>" type="button"><i class="fa fa-plus"></i></button>
                        </div>
                    </td>
                    <td><?php echo e($row['product_cost']); ?> <?php echo e(__('web.sar')); ?></td>
                    <?php if($route == 'cart'): ?>
                        <?php if($settings['tax_valid']): ?>
                            <td><?php echo e($row['tax_cost']); ?> <?php echo e(__('web.sar')); ?></td>
                        <?php endif; ?>
                    <?php endif; ?>
                        <td>
                            <b><?php echo e($route == 'cart' ? ($row['product_cost'] + $row['tax_cost']) : $row['product_cost']); ?> <?php echo e(__('web.sar')); ?></b>
                        </td>
                    <?php if($route == 'cart'): ?>
                        <td>
                            <button type="button" onclick="deleteCart(this)" action-id="<?php echo e(route('cart.destroy',$row['id'])); ?>" class="delete_butn butn sm_butn rounded-circle gray_butn">
                                <i class="fal fa-trash-alt mx-0"></i>
                            </button>
                        </td>
                    <?php endif; ?>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div>
    <div class="summary_box col-lg-4 ms-auto">
        <div class="item d-flex justify-content-between mb-3">
            <p class="label"><?php echo e(__('web.cost')); ?></p>
            <span class="color-primary"><?php echo e($total_products); ?> <?php echo e(__('web.sar')); ?></span>
        </div>
        <?php if($settings['tax_valid']): ?>
            <div class="item d-flex justify-content-between mb-3">
                <p class="label"><?php echo e(__('web.tax')); ?></p>
                <span class="color-primary"><?php echo e($total_tax); ?> <?php echo e(__('web.sar')); ?></span>
            </div>
        <?php endif; ?>
        <?php if($route != 'cart'): ?>
            <div class="item d-flex justify-content-between mb-3">
                <p class="label"><?php echo e(__('web.shipping_cost')); ?></p>
                <span class="color-primary"><?php echo e($shipping_cost); ?> <?php echo e(__('web.sar')); ?></span>
            </div>
        <?php endif; ?>
        <?php if($route != 'cart'): ?>
            <?php if($on_hand_cost != 0): ?>
                <div class="item d-flex justify-content-between mb-3">
                    <p class="label"><?php echo e(__('web.on_hand_cost')); ?></p>
                    <span class="color-primary"><?php echo e($on_hand_cost); ?> <?php echo e(__('web.sar')); ?></span>
                </div>
            <?php endif; ?>
        <?php endif; ?>
        <?php if($route != 'cart'): ?>
            <?php if($discount != 0): ?>
                <div class="item d-flex justify-content-between mb-3">
                    <p class="label"><?php echo e(__('web.discount')); ?></p>
                    <span class="color-primary"><?php echo e($discount); ?> <?php echo e(__('web.sar')); ?></span>
                </div>
            <?php endif; ?>
        <?php endif; ?>
        <div class="item d-flex justify-content-between mb-3">
            <p class="label"><?php echo e(__('web.full_total')); ?></p>
            <span class="color-primary "><?php echo e($route == 'cart' ? $total_products_tax : $total); ?> <?php echo e(__('web.sar')); ?></span>
        </div>
    </div>

    <script src="<?php echo e(url('')); ?>/assets/web/js/custom/product.js"></script>

<?php else: ?>
    <?php echo $__env->make('web.pages.components.not_found',['message'=>__('web.not_found_product_cart')], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>
<?php /**PATH /Applications/MAMP/htdocs/electric/resources/views/web/pages/cart/calculate.blade.php ENDPATH**/ ?>