<?php $__env->startSection('main-content'); ?>
<div class="pb-20">
    <div class="flex justify-between items-center mb-8">
        <div>
            <h1 class="text-2xl font-black text-slate-900 tracking-tight">Products and Services</h1>
            <p class="text-[13px] font-bold text-indigo-600">Manage items, pricing, and inventory mapping</p>
        </div>
        <div class="flex gap-2">
            <a href="<?php echo e(route('products.create')); ?>" class="bg-indigo-600 text-white px-5 py-2 rounded-sm text-[13px] font-bold hover:bg-indigo-700 transition shadow-lg flex items-center gap-2">
                <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
                New item
            </a>
        </div>
    </div>

    <div class="bg-white border border-slate-300 rounded-sm overflow-hidden shadow-sm">
        <table class="w-full text-left border-collapse">
            <thead class="bg-slate-50 border-b border-slate-300 text-[11px] font-bold text-slate-500">
                <tr>
                    <th class="px-6 py-4 border-r">Name & SKU</th>
                    <th class="px-6 py-4 border-r">Type</th>
                    <th class="px-6 py-4 border-r">Sales price</th>
                    <th class="px-6 py-4 border-r">Cost</th>
                    <th class="px-6 py-4 border-r text-center">Qty on hand</th>
                    <th class="px-6 py-4 text-right">Action</th>
                </tr>
            </thead>
            <tbody class="text-xs font-medium">
                <?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr class="border-b border-slate-200 hover:bg-slate-50/50 transition">
                    <td class="px-6 py-4 border-r">
                        <span class="block font-bold text-slate-800"><?php echo e($product->name); ?></span>
                        <span class="text-[10px] text-slate-400 font-mono"><?php echo e($product->sku ?? 'No SKU'); ?></span>
                    </td>
                    <td class="px-6 py-4 border-r">
                        <span class="px-2 py-0.5 rounded-sm text-[10px] font-bold border <?php echo e($product->type == 'Inventory' ? 'bg-amber-50 text-amber-600 border-amber-200' : 'bg-slate-50 text-slate-500 border-slate-200'); ?>">
                            <?php echo e($product->type); ?>

                        </span>
                    </td>
                    <td class="px-6 py-4 border-r font-mono">K<?php echo e(number_format($product->sales_price, 2)); ?></td>
                    <td class="px-6 py-4 border-r font-mono text-slate-400">K<?php echo e(number_format($product->cost, 2)); ?></td>
                    <td class="px-6 py-4 border-r text-center font-bold">
                        <?php echo e($product->type == 'Inventory' ? $product->qty_on_hand : 'N/A'); ?>

                    </td>
                    <td class="px-6 py-4 text-right">
                        <a href="<?php echo e(route('products.edit', $product->id)); ?>" class="text-indigo-600 hover:text-indigo-900 font-bold">Edit</a>
                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="6" class="p-24 text-center text-slate-300 font-bold italic">No products or services found</td>
                </tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.aura-main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/edugfqvw/auraaccountify.online/portal/resources/views/productsandservices/index.blade.php ENDPATH**/ ?>