
<?php $__env->startSection('title', 'Home Service App'); ?>

<?php $__env->startSection('content'); ?>
<div class="py-3 space-y-3">
    <div>
        <h1 class="text-lg font-bold text-gray-800">Home Service App</h1>
        <p class="text-xs text-gray-500">Ringkasan antrean teknisi hari ini.</p>
    </div>

    <div class="grid grid-cols-2 gap-2.5">
        <div class="rounded-xl border border-yellow-200 bg-yellow-50 p-3">
            <p class="text-[11px] text-yellow-700 font-medium">Pending</p>
            <p class="text-lg font-bold text-yellow-800"><?php echo e($stats['pending']); ?></p>
        </div>
        <div class="rounded-xl border border-sky-200 bg-sky-50 p-3">
            <p class="text-[11px] text-sky-700 font-medium">Checking</p>
            <p class="text-lg font-bold text-sky-800"><?php echo e($stats['checking']); ?></p>
        </div>
        <div class="rounded-xl border border-blue-200 bg-blue-50 p-3">
            <p class="text-[11px] text-blue-700 font-medium">Repairing</p>
            <p class="text-lg font-bold text-blue-800"><?php echo e($stats['repairing']); ?></p>
        </div>
        <div class="rounded-xl border border-green-200 bg-green-50 p-3">
            <p class="text-[11px] text-green-700 font-medium">Ready</p>
            <p class="text-lg font-bold text-green-800"><?php echo e($stats['ready']); ?></p>
        </div>
    </div>

    <div class="rounded-xl border border-emerald-200 bg-emerald-50 p-3">
        <p class="text-[11px] text-emerald-700 font-medium">Picked Up Hari Ini</p>
        <p class="text-lg font-bold text-emerald-800"><?php echo e($stats['picked_up_today']); ?></p>
    </div>

    <div class="grid grid-cols-2 gap-2">
        <a href="<?php echo e(route('technician.tickets.index')); ?>"
           class="inline-flex items-center justify-center rounded-xl bg-emerald-600 text-white text-xs font-semibold px-3 py-2.5 hover:bg-emerald-700 transition">
            Buka List Service
        </a>
        <a href="<?php echo e(route('technician.scanner')); ?>"
           class="inline-flex items-center justify-center rounded-xl border border-gray-300 bg-white text-gray-700 text-xs font-semibold px-3 py-2.5 hover:bg-gray-50 transition">
            Buka Scanner
        </a>
    </div>

    <div class="rounded-xl bg-white border border-gray-200 p-3">
        <div class="flex items-center justify-between mb-2">
            <h2 class="text-sm font-semibold text-gray-700">Update Terbaru</h2>
            <a href="<?php echo e(route('technician.tickets.index')); ?>" class="text-[11px] text-emerald-700 font-medium">Lihat semua</a>
        </div>

        <?php if($recentTickets->isEmpty()): ?>
            <p class="text-xs text-gray-400">Belum ada tiket aktif.</p>
        <?php else: ?>
            <div class="space-y-2">
                <?php $__currentLoopData = $recentTickets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ticket): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <a href="<?php echo e(route('technician.book', $ticket)); ?>"
                   class="block rounded-lg border border-gray-100 bg-gray-50 px-3 py-2 hover:bg-gray-100 transition">
                    <p class="text-xs font-mono font-semibold text-emerald-700"><?php echo e($ticket->ticket_code); ?></p>
                    <p class="text-xs font-semibold text-gray-800 truncate"><?php echo e($ticket->customer->name); ?></p>
                    <p class="text-[11px] text-gray-500 truncate"><?php echo e($ticket->brand); ?> <?php echo e($ticket->model); ?> • <?php echo e($ticket->status); ?></p>
                </a>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        <?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>

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