<?php $__env->startSection('title', 'Barcodes'); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid py-4">
    <div class="mx-auto" style="max-width:1100px;">
        <div class="text-center mb-4">
            <h1 class="fw-bold mb-2">Barcodes</h1>
            <p class="text-muted mb-0">সব প্রোডাক্টের বারকোড এখানে দেখা ও প্রিন্ট করা যাবে</p>
        </div>

        <div class="card border-0 shadow-sm rounded-4 mb-4">
            <div class="card-body p-4">
                <form method="GET" action="<?php echo e(route('admin.barcodes.index')); ?>" class="d-flex justify-content-center gap-2 flex-wrap">
                    <input type="text" name="q" class="form-control rounded-4" style="max-width:420px;" placeholder="নাম / কোড / বারকোড দিয়ে খুঁজুন" value="<?php echo e(request('q')); ?>">
                    <button class="btn btn-dark rounded-4 px-4" type="submit">Search</button>
                    <a href="<?php echo e(route('admin.barcodes.index')); ?>" class="btn btn-light border rounded-4 px-4">Reset</a>
                </form>
            </div>
        </div>

        <div class="row g-4">
            <?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <?php $code = $product->barcode ?: $product->product_code; ?>
                <div class="col-md-4 col-lg-3">
                    <div class="card h-100 border-0 shadow-sm rounded-4">
                        <div class="card-body text-center p-4">
                            <h5 class="fw-bold mb-1"><?php echo e($product->product_name); ?></h5>
                            <div class="text-muted small mb-3">Code: <?php echo e($product->product_code); ?></div>
                            <div class="border rounded-4 p-3 mb-3 bg-white">
                                <img class="img-fluid" src="https://barcode.tec-it.com/barcode.ashx?data=<?php echo e(urlencode($code)); ?>&code=Code128&multiplebarcodes=false&translate-esc=false&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=&bgcolor=&qunit=Mm&quiet=0" alt="Barcode">
                            </div>
                            <div class="d-flex gap-2 justify-content-center">
                                <a href="https://barcode.tec-it.com/barcode.ashx?data=<?php echo e(urlencode($code)); ?>&code=Code128&multiplebarcodes=false&translate-esc=false&unit=Fit&dpi=300&imagetype=png&rotation=0&color=&bgcolor=&qunit=Mm&quiet=0" class="btn btn-light border rounded-4 px-3" download>Download</a>
                                <a href="<?php echo e(route('admin.barcodes.print', $product->id)); ?>" class="btn btn-dark rounded-4 px-3" target="_blank">Print</a>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="col-12">
                    <div class="card border-0 shadow-sm rounded-4">
                        <div class="card-body text-center py-5 text-muted">কোনো বারকোড-রেডি প্রোডাক্ট পাওয়া যায়নি।</div>
                    </div>
                </div>
            <?php endif; ?>
        </div>

        <?php if(method_exists($products, 'links')): ?>
            <div class="mt-4"><?php echo e($products->links()); ?></div>
        <?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH J:\xampp\htdocs\pos\resources\views/admin/pages/barcodes/index.blade.php ENDPATH**/ ?>