
<?php $__env->startSection('title', 'Tiket Siap Diambil'); ?>

<?php $__env->startSection('content'); ?>
<div class="py-2">

    <div class="mb-5">
        <h1 class="text-xl font-bold text-gray-800">Tiket Siap Diambil</h1>
        <p class="text-sm text-gray-500 mt-0.5"><?php echo e($tickets->total()); ?> tiket menunggu serah terima</p>
    </div>

    <form method="GET" class="mb-4">
        <input type="text" name="search" value="<?php echo e($search ?? ''); ?>" placeholder="Cari kode/pelanggan/perangkat"
               class="w-full rounded-xl border border-gray-300 px-4 py-2.5 text-sm focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent">
    </form>

    <?php if($tickets->isEmpty()): ?>
    <div class="rounded-2xl bg-white border border-gray-200 shadow-sm p-12 text-center">
        <svg class="w-14 h-14 mx-auto mb-3 text-gray-200" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
                  d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
        </svg>
        <p class="text-gray-500 font-medium">Tidak ada tiket yang siap diambil saat ini.</p>
    </div>
    <?php else: ?>
    <div class="space-y-3">
        <?php $__currentLoopData = $tickets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ticket): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="rounded-2xl bg-white border border-green-100 shadow-sm overflow-hidden">
            <div class="h-1 bg-green-500"></div>
            <div class="p-4 flex items-center justify-between gap-4 flex-wrap">
                <div>
                    <p class="font-mono font-bold text-gray-800 text-base"><?php echo e($ticket->ticket_code); ?></p>
                    <p class="text-sm font-semibold text-gray-700 mt-0.5"><?php echo e($ticket->customer->name); ?></p>
                    <p class="text-xs text-gray-400"><?php echo e($ticket->brand); ?> <?php echo e($ticket->model); ?>

                        &middot; <?php echo e($ticket->device_type); ?></p>
                </div>
                <a href="<?php echo e(route('handover.show', $ticket->id)); ?>"
                   class="flex-shrink-0 inline-flex items-center gap-1.5 bg-green-600 text-white
                          text-sm font-semibold rounded-xl px-4 py-2.5 hover:bg-green-700 transition">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                              d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
                    </svg>
                    Serah Terima
                </a>
            </div>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
    <?php endif; ?>

    <div class="mt-4">
        <?php echo e($tickets->links()); ?>

    </div>

</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.courier', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\Service-sistem\resources\views/courier/ready.blade.php ENDPATH**/ ?>