{{-- Load Flatpickr CSS and JS --}} @php // Define rental-type-specific labels $rentalTypeName = $listing->rentalType->name ?? ''; $labels = [ 'Car' => ['start' => 'Pick-up', 'end' => 'Drop-off'], 'Houseboat' => ['start' => 'Check-in', 'end' => 'Check-out'], 'Guesthouse' => ['start' => 'Check-in', 'end' => 'Check-out'], 'Boat' => ['start' => 'Departure', 'end' => 'Return'], 'Fishing Trip' => ['start' => 'Trip Start', 'end' => 'Trip End'], ]; $currentLabels = $labels[$rentalTypeName] ?? ['start' => 'Check-in', 'end' => 'Check-out']; @endphp {{-- Availability Info Banner --}} @php $bookedDates = $calendarData['booked'] ?? []; $bufferDates = $calendarData['buffer'] ?? []; @endphp @if($listing->buffer_hours > 0 || count($bookedDates) > 0 || count($bufferDates) > 0)

Booking Availability Information

    @if(count($bookedDates) > 0)
  • {{ count($bookedDates) }} dates currently booked
  • @endif @if($listing->buffer_hours > 0)
  • {{ $listing->buffer_hours }} hour preparation buffer after each checkout
  • @endif
  • Dates not marked as booked or in buffer period are available

The native date picker will show unavailable dates - these cannot be selected for booking.

@endif
{{-- Pick-up Date & Hour --}}
{{-- Date Picker --}} {{-- Hour Availability Visual Grid (PRIMARY METHOD) --}} {{-- Hidden select for form submission --}} {{-- Selected time display --}} @error('check_in') {{ $message }} @enderror @error('check_in_hour') {{ $message }} @enderror
{{-- Drop-off Date & Hour --}}
{{-- Date Picker --}} {{-- Hour Availability Visual Grid (PRIMARY METHOD) --}} {{-- Hidden select for form submission --}} {{-- Selected time display --}} @error('check_out')

Dates Not Available

{{ $message }}

@enderror @error('check_out_hour') {{ $message }} @enderror
@error('guests') {{ $message }} @enderror
{{-- Pickup/Dropoff Locations (for Car/Boat rentals) --}} @if($listing->pickupLocations && $listing->pickupLocations->count() > 0)

Pickup & Dropoff Locations

{{-- Pickup Location --}}
@error('pickup_location_id') {{ $message }} @enderror
{{-- Dropoff Location --}}
@error('dropoff_location_id') {{ $message }} @enderror

You can choose different locations for pickup and dropoff for your convenience.

@endif @if($listing->addOns && $listing->addOns->count() > 0)
@foreach($listing->addOns as $addOn) @endforeach
@endif
@error('payment_channel') {{ $message }} @enderror
@if($days > 0)
RM {{ number_format($listing->price_per_day, 2) }} x {{ $days }} days RM {{ number_format($subtotal, 2) }}
@if($discount_amount > 0)
Discount ({{ number_format($discount_percentage, 0) }}% OFF) -RM {{ number_format($discount_amount, 2) }}
@endif @if($addOnsTotal > 0)
Add-ons ({{ count($selectedAddOns) }}) +RM {{ number_format($addOnsTotal, 2) }}
@endif
Subtotal RM {{ number_format($booking_amount, 2) }}
@if($gateway_fee > 0)
Gateway Fee RM {{ number_format($gateway_fee, 2) }}
@endif
Total RM {{ number_format($total_price, 2) }}
@endif
{{-- Custom Flatpickr Styling and Initialization --}} @script @endscript