{{-- resources/views/livewire/trips/pre-planned-trip-selection.blade.php --}}
@if ($showTravelerSelection)

How many travelers?

Let us know your group size so we can show you the perfect trip packages.

Total: {{ $totalTravelers }} {{ $totalTravelers === 1 ? 'traveler' : 'travelers' }}
{{ $adultsCount }} {{ $adultsCount === 1 ? 'adult' : 'adults' }} @if ($childrenCount > 0) + {{ $childrenCount }} {{ $childrenCount === 1 ? 'child' : 'children' }} @endif
@elseif(!$selectedDestination)

Choose a Destination

{{ $totalTravelers }} {{ $totalTravelers === 1 ? 'traveler' : 'travelers' }} ({{ $adultsCount }} {{ $adultsCount === 1 ? 'adult' : 'adults' }} @if ($childrenCount > 0) + {{ $childrenCount }} {{ $childrenCount === 1 ? 'child' : 'children' }} @endif)
@if ($destinationSearch) @endif
@if ($destinationSearch)
@if ($displayDestinations->count() > 0) Showing {{ $displayDestinations->count() }} of {{ $destinations->count() }} destinations @else No destinations found matching "{{ $destinationSearch }}" @endif
@endif
@if ($displayDestinations->count() > 0)
@foreach ($displayDestinations as $destination)
@if ($destination->image_url) {{ $destination->name }} @else
{{ $destination->name }}
@endif

{{ $destination->name }}

{{ $destination->country }} @if ($destination->city) , {{ $destination->city }} @endif

{{ $destination->description }}

{{ $destination->tripTemplates->count() }} {{ $destination->tripTemplates->count() === 1 ? 'trip package' : 'trip packages' }}
View Trips
@endforeach
@else

No destinations found

We couldn't find any destinations matching "{{ $destinationSearch }}".

@endif @if ($destinationSearch && $displayDestinations->count() === 0)

Popular Destinations

@foreach ($destinations->take(8) as $popularDestination) @endforeach
@endif @elseif($selectedDestination && !$showTemplateDetails)

Trip Packages for {{ $selectedDestination->name }}

{{ $totalTravelers }} {{ $totalTravelers === 1 ? 'traveler' : 'travelers' }} @if ($childrenCount > 0) • Child-friendly @endif
@if ($filteredTemplates->count() > 0)
@foreach ($filteredTemplates as $template) @php $capacityInfo = $this->getCapacityInfo($template); @endphp
@if ($template->destination->image_url) {{ $template->destination->name }} @else
{{ $template->destination->name }}
@endif

{{ $template->title }}

{{ $template->destination->name }}, {{ $template->destination->country }}
{{ ucfirst($template->difficulty_level) }} @if ($capacityInfo['compatible']) ✓ Perfect Fit @else Size Mismatch @endif

{{ $template->description }}

Capacity: {{ $capacityInfo['capacity'] }}
Child Policy: {{ $capacityInfo['child_friendly'] }}
@if ($template->highlights) @php $highlights = is_array($template->highlights) ? $template->highlights : json_decode($template->highlights, true); $previewHighlights = $highlights ? array_slice($highlights, 0, 3) : []; @endphp @if (!empty($previewHighlights))

Highlights:

    @foreach ($previewHighlights as $highlight)
  • {{ $highlight }}
  • @endforeach
@if ($highlights && count($highlights) > 3)
+{{ count($highlights) - 3 }} more
@endif
@endif @endif
{{ $template->duration_days }} days
From ${{ number_format($template->base_price, 0) }}/person
{{ ucfirst($template->trip_style) }} style
@if ($capacityInfo['compatible']) @else

This package cannot accommodate your group size.

@endif
@endforeach
@else

No Compatible Packages Found

We couldn't find any trip packages that accommodate {{ $totalTravelers }} {{ $totalTravelers === 1 ? 'traveler' : 'travelers' }} @if ($childrenCount > 0) with {{ $childrenCount }} {{ $childrenCount === 1 ? 'child' : 'children' }} @endif for {{ $selectedDestination->name }}.

@endif @elseif($showTemplateDetails && $selectedTemplate)

{{ $selectedTemplate->title }}

{{ $totalTravelers }} {{ $totalTravelers === 1 ? 'traveler' : 'travelers' }}
@if ($selectedTemplate->destination->image_url) {{ $selectedTemplate->destination->name }} @else
{{ $selectedTemplate->destination->name }}
@endif @if (!empty($templateHighlights))

Trip Highlights

    @foreach ($templateHighlights as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif
Duration: {{ $selectedTemplate->duration_days }} days
Base Price: ${{ number_format($selectedTemplate->base_price, 2) }}/person
Difficulty: {{ ucfirst($selectedTemplate->difficulty_level) }}
Style: {{ ucfirst($selectedTemplate->trip_style) }}
Activities: {{ $selectedTemplate->activities->count() }}
Capacity: {{ $selectedTemplate->capacity_range }}
Child Policy: {{ $selectedTemplate->child_friendly_info['display_text'] }}
@if (isset($optionalActivities) && count($optionalActivities) > 0)

Optional Activities

Select optional activities to enhance your trip experience:

@foreach ($optionalActivities as $activity)
id])) checked @endif class="h-4 w-4 text-blue-600 rounded border-gray-300 focus:ring-blue-500">
@endforeach
@endif

Group Pricing Summary

{{ $adultsCount }} {{ $adultsCount === 1 ? 'Adult' : 'Adults' }} × ${{ number_format($selectedTemplate->base_price, 2) }}: ${{ number_format($selectedTemplate->base_price * $adultsCount, 2) }}
@if ($childrenCount > 0 && $selectedTemplate->children_allowed) @php $freeChildren = min($childrenCount, $selectedTemplate->free_children_limit); $payingChildren = max( 0, $childrenCount - $selectedTemplate->free_children_limit, ); $childDiscountMultiplier = 1 - $selectedTemplate->child_discount_percentage / 100; $childPrice = $selectedTemplate->base_price * $childDiscountMultiplier; @endphp @if ($freeChildren > 0)
{{ $freeChildren }} {{ $freeChildren === 1 ? 'Child' : 'Children' }} (Free): $0.00
@endif @if ($payingChildren > 0)
{{ $payingChildren }} {{ $payingChildren === 1 ? 'Child' : 'Children' }} @if ($selectedTemplate->child_discount_percentage > 0) ({{ $selectedTemplate->child_discount_percentage }}% discount) @endif × ${{ number_format($childPrice, 2) }}: ${{ number_format($childPrice * $payingChildren, 2) }}
@endif @endif @if (count($selectedOptionalActivities) > 0)

Selected Optional Activities:

@foreach ($selectedOptionalActivities as $activity)
{{ $activity['title'] }} × {{ $totalTravelers }}: ${{ number_format($activity['cost'] * $totalTravelers, 2) }}
@endforeach
@endif
Total for {{ $totalTravelers }} {{ $totalTravelers === 1 ? 'traveler' : 'travelers' }}: ${{ number_format($totalPrice, 2) }}
@if ( $childrenCount > 0 && $selectedTemplate->children_allowed && ($selectedTemplate->child_discount_percentage > 0 || $selectedTemplate->free_children_limit > 0)) @php $fullPriceForChildren = $selectedTemplate->base_price * $childrenCount; $actualChildCost = $payingChildren * $childPrice; $totalSavings = $fullPriceForChildren - $actualChildCost; @endphp @if ($totalSavings > 0)
You save with child pricing: ${{ number_format($totalSavings, 2) }}
@endif @endif

Trip Overview

{{ $selectedTemplate->description }}

Daily Itinerary

@for ($day = 1; $day <= $selectedTemplate->duration_days; $day++)
{{ $day }}

Day {{ $day }}: @if (isset($templateActivities[$day]) && count($templateActivities[$day]) > 0) {{ $templateActivities[$day][0]->title }} @else Exploration Day @endif

@if (isset($templateActivities[$day])) @foreach ($templateActivities[$day] as $activity)
{{ $activity->title }}
{{ date('g:i A', strtotime($activity->start_time)) }} - {{ date('g:i A', strtotime($activity->end_time)) }}

{{ $activity->description }}

{{ $activity->location }} @if ($activity->cost > 0) ${{ number_format($activity->cost, 2) }} @endif {{ ucfirst($activity->category) }} @if ($activity->is_highlight) Highlight @endif
@endforeach @else

No activities scheduled for this day.

@endif
@endfor
@endif