<?php $__env->startSection('title', 'Booking Management - NRT SA Admin'); ?>

<?php $__env->startSection('content'); ?>
<div class="p-6">
    <!-- Header -->
    <div class="mb-8">
        <h1 class="text-3xl font-bold text-white mb-2 font-display text-glow">Booking Management</h1>
        <p class="text-gray-300 font-body">Manage customer bookings and reservations</p>
    </div>

    <!-- Bookings List -->
    <div class="glass-card p-6 rounded-xl">
        <div class="overflow-x-auto">
            <table class="w-full text-left">
                <thead>
                    <tr class="border-b border-gray-700">
                        <th class="py-3 px-4 text-gray-300 font-body">Customer</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Vehicle</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Pickup Date</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Dropoff Date</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Status</th>
                        <th class="py-3 px-4 text-gray-300 font-body">Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $bookings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $booking): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="border-b border-gray-800">
                        <td class="py-3 px-4">
                            <div>
                                <p class="text-white font-body font-semibold"><?php echo e($booking->name); ?></p>
                                <p class="text-gray-400 text-sm font-body"><?php echo e($booking->email); ?></p>
                                <p class="text-gray-400 text-sm font-body"><?php echo e($booking->phone); ?></p>
                            </div>
                        </td>
                        <td class="py-3 px-4 text-gray-300 font-body"><?php echo e($booking->vehicle->name ?? 'N/A'); ?></td>
                        <td class="py-3 px-4 text-gray-300 font-body"><?php echo e($booking->pickup_date->format('M d, Y')); ?></td>
                        <td class="py-3 px-4 text-gray-300 font-body"><?php echo e($booking->dropoff_date->format('M d, Y')); ?></td>
                        <td class="py-3 px-4">
                            <span class="px-2 py-1 rounded-full text-xs font-body
                                <?php if($booking->status === 'pending'): ?> bg-yellow-100 text-yellow-800
                                <?php elseif($booking->status === 'confirmed'): ?> bg-green-100 text-green-800
                                <?php elseif($booking->status === 'completed'): ?> bg-blue-100 text-blue-800
                                <?php else: ?> bg-red-100 text-red-800
                                <?php endif; ?>">
                                <?php echo e(ucfirst($booking->status)); ?>

                            </span>
                        </td>
                        <td class="py-3 px-4">
                            <div class="flex space-x-2">
                                <a href="<?php echo e(route('admin.bookings.show', $booking)); ?>" class="text-blue-400 hover:text-blue-300">
                                    <i class="fas fa-eye"></i>
                                </a>
                                <a href="<?php echo e(route('admin.bookings.edit', $booking)); ?>" class="text-green-400 hover:text-green-300">
                                    <i class="fas fa-edit"></i>
                                </a>
                                <form method="POST" action="<?php echo e(route('admin.bookings.destroy', $booking)); ?>" class="inline" onsubmit="return confirm('Are you sure you want to delete this booking?')">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="text-red-400 hover:text-red-300">
                                        <i class="fas fa-trash"></i>
                                    </button>
                                </form>
                            </div>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="6" class="py-8 text-center text-gray-400 font-body">No bookings found</td>
                    </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>

        <?php if($bookings->hasPages()): ?>
        <div class="mt-6">
            <?php echo e($bookings->links()); ?>

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

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\nrt\resources\views/admin/bookings/index.blade.php ENDPATH**/ ?>