<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
            <h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
                <?php echo e(__('Reservas de farmacia')); ?> — <?php echo e($patient->name); ?>

            </h2>
            <div class="flex flex-wrap gap-2">
                <a href="<?php echo e(route('clients.patients.show', [$client, $patient])); ?>" class="text-sm text-gray-600 dark:text-gray-400 hover:underline"><?php echo e(__('Volver al paciente')); ?></a>
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('reservations.manage')): ?>
                    <a href="<?php echo e(route('clients.patients.product-reservations.create', [$client, $patient])); ?>"
                       class="inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white hover:bg-indigo-500">
                        <?php echo e(__('Nueva reserva')); ?>

                    </a>
                <?php endif; ?>
            </div>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-8">
        <div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white dark:bg-gray-800 shadow-sm sm:rounded-lg overflow-hidden">
                <ul class="divide-y divide-gray-200 dark:divide-gray-700">
                    <?php $__currentLoopData = $patient->productReservations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $res): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li class="p-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
                            <div>
                                <a href="<?php echo e(route('clients.patients.product-reservations.show', [$client, $patient, $res])); ?>"
                                   class="font-medium text-indigo-600 dark:text-indigo-400 hover:underline">#<?php echo e($res->id); ?></a>
                                <span class="text-sm text-gray-500 dark:text-gray-400">· <?php echo e($res->created_at->translatedFormat('d M Y H:i')); ?></span>
                                <?php if($res->author): ?>
                                    <span class="text-sm text-gray-500">· <?php echo e($res->author->name); ?></span>
                                <?php endif; ?>
                            </div>
                            <span class="text-sm shrink-0">
                                <?php if($res->status === 'pending'): ?>
                                    <span class="text-amber-600 dark:text-amber-400"><?php echo e(__('Pendiente en caja')); ?></span>
                                <?php elseif($res->status === 'billed'): ?>
                                    <span class="text-green-600 dark:text-green-400"><?php echo e(__('Cobrada')); ?></span>
                                <?php else: ?>
                                    <span class="text-gray-500"><?php echo e(__('Anulada')); ?></span>
                                <?php endif; ?>
                            </span>
                        </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php if($patient->productReservations->isEmpty()): ?>
                        <li class="p-8 text-center text-gray-500"><?php echo e(__('Sin reservas.')); ?></li>
                    <?php endif; ?>
                </ul>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\wamp64\www\vet\resources\views/product_reservations/index.blade.php ENDPATH**/ ?>