<?php if (isset($component)) { $__componentOriginal5863877a5171c196453bfa0bd807e410 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5863877a5171c196453bfa0bd807e410 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.layouts.app','data' => ['title' => 'Kitchen Display']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('layouts.app'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Kitchen Display']); ?>
    <div class="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
        <?php $__empty_1 = true; $__currentLoopData = $orders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div class="surface p-4">
                <div class="mb-2 flex items-center justify-between">
                    <div>
                        <p class="text-sm font-semibold"><?php echo e($order->receipt_number); ?></p>
                        <p class="text-xs text-slate-500"><?php echo e($order->created_at->format('d M H:i')); ?></p>
                    </div>
                    <span class="rounded-full px-2 py-1 text-xs font-semibold
                        <?php echo e($order->kitchen_status === 'NEW' ? 'bg-sky-100 text-sky-700' : ''); ?>

                        <?php echo e($order->kitchen_status === 'PREPARING' ? 'bg-amber-100 text-amber-700' : ''); ?>

                        <?php echo e($order->kitchen_status === 'READY' ? 'bg-emerald-100 text-emerald-700' : ''); ?>">
                        <?php echo e($order->kitchen_status); ?>

                    </span>
                </div>
                <div class="mb-3 space-y-1 text-sm">
                    <?php $__currentLoopData = $order->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="flex justify-between">
                            <span><?php echo e($item->name_snapshot); ?></span>
                            <strong>x<?php echo e($item->qty); ?></strong>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
                <div class="flex flex-wrap gap-2">
                    <?php $__currentLoopData = ['NEW','PREPARING','READY','SERVED']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <form method="POST" action="<?php echo e(route('kds.update', $order)); ?>">
                            <?php echo csrf_field(); ?>
                            <input type="hidden" name="kitchen_status" value="<?php echo e($status); ?>">
                            <button class="rounded-lg border px-2 py-1 text-xs <?php echo e($order->kitchen_status === $status ? 'border-slate-900 bg-slate-900 text-white' : 'border-slate-200 bg-white'); ?>">
                                <?php echo e($status); ?>

                            </button>
                        </form>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <div class="surface p-4 text-sm text-slate-500">Belum ada order untuk dapur.</div>
        <?php endif; ?>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5863877a5171c196453bfa0bd807e410)): ?>
<?php $attributes = $__attributesOriginal5863877a5171c196453bfa0bd807e410; ?>
<?php unset($__attributesOriginal5863877a5171c196453bfa0bd807e410); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5863877a5171c196453bfa0bd807e410)): ?>
<?php $component = $__componentOriginal5863877a5171c196453bfa0bd807e410; ?>
<?php unset($__componentOriginal5863877a5171c196453bfa0bd807e410); ?>
<?php endif; ?>
<?php /**PATH C:\Users\IPI ACD\Documents\WORKSPACE\kasir\resources\views/kds/index.blade.php ENDPATH**/ ?>