

<?php $__env->startSection('content'); ?>
<div class="container my-5">

    <div class="text-center mb-5">
        <h1 class="fw-bold"><?php echo e($settings->hotel_name); ?></h1>
        <p class="text-muted">Select multiple rooms & book together</p>
    </div>

    <!-- DATE SELECTION -->
    <form method="POST" action="<?php echo e(route('booking.preview')); ?>">
        <?php echo csrf_field(); ?>

        <div class="row mb-4">
            <div class="col-md-4">
                <label>Check In</label>
                <input type="date" name="check_in" class="form-control" required>
            </div>
            <div class="col-md-4">
                <label>Check Out</label>
                <input type="date" name="check_out" class="form-control" required>
            </div>
        </div>

        <div class="row g-4">
            <?php $__currentLoopData = $rooms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $room): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-lg-4 col-md-6">
                <div class="card border-0 shadow-lg h-100 rounded-4 overflow-hidden">

                    <img
                        src="<?php echo e(asset('uploads/rooms/' . optional($room->images->first())->image)); ?>"
                        onerror="this.src='<?php echo e(asset('images/default.jpg')); ?>'"
                        class="img-fluid"
                        style="height:220px;object-fit:cover;">

                    <div class="card-body">
                        <h5 class="fw-semibold">
                            Room <?php echo e($room->room_number); ?>

                            <small class="text-muted">(<?php echo e($room->category->name); ?>)</small>
                        </h5>

                        <p class="text-muted">
                            <?php echo e(Str::limit($room->description, 80)); ?>

                        </p>

                        <p class="fw-bold mb-2">
                            ₹<?php echo e($room->price_per_night); ?> / night
                        </p>

                        <!-- ROOM SELECTION -->
                        <div class="d-flex align-items-center gap-2">
                            <input type="checkbox"
                                   name="rooms[<?php echo e($room->id); ?>][selected]"
                                   value="1">

                            <label class="mb-0">Select</label>

                            <select name="rooms[<?php echo e($room->id); ?>][qty]"
                                    class="form-select form-select-sm w-50">
                                <?php for($i=1; $i<=$room->max_guests; $i++): ?>
                                    <option value="<?php echo e($i); ?>"><?php echo e($i); ?> Guest(s)</option>
                                <?php endfor; ?>
                            </select>
                        </div>

                    </div>
                </div>
            </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        <!-- BOOK BUTTON -->
        <div class="text-center mt-5">
            <button class="btn btn-dark btn-lg px-5 rounded-pill">
                Book Selected Rooms
            </button>
        </div>
    </form>

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

<?php echo $__env->make('frontend.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/jitrealx/public_html/hotelbooking/resources/views/frontend/rooms/index.blade.php ENDPATH**/ ?>