{{-- resources/views/livewire/trips/destination-selection.blade.php --}}

Where would you like to travel?

@if($isLoading)
@endif
@if($showDestinationDropdown && (count($destinationResults) > 0 || $isLoading))
@if($isLoading)
Searching...
@else @forelse($destinationResults as $result)
{{ $result['name'] }}
{{ $result['formatted_location'] ?? ($result['country'] ?? 'International') }}
@if(isset($result['trip_count']) && $result['trip_count'] > 0)
{{ $result['trip_count'] }} trip package{{ $result['trip_count'] > 1 ? 's' : '' }} available
@endif
@empty
No destinations found for "{{ $destinationQuery }}"
@endforelse @endif
@endif

Popular Destinations

@if($popularDestinations && $popularDestinations->count() > 0)
@foreach($popularDestinations as $destination)
@if(isset($destination->full_image_url) && $destination->full_image_url) {{ $destination->name }} @else
{{ $destination->name }}
@endif
@if(isset($destination->tripTemplates) && $destination->tripTemplates->where('is_featured', true)->count() > 0)
Featured
@endif @if(isset($destination->trip_count) && $destination->trip_count > 0)
{{ $destination->trip_count }} trip{{ $destination->trip_count > 1 ? 's' : '' }}
@endif

{{ $destination->name }}

{{ isset($destination->formatted_location) ? $destination->formatted_location : ($destination->country ?? 'International') }}
@if(isset($destination->price_range) && $destination->price_range)
{{ $destination->price_range }}
@endif
@endforeach
@else

No destinations available

Check back later for amazing destinations.

@endif @if(count($recentSearches) > 0)

Your Recent Searches

@foreach($recentSearches as $index => $search)

{{ $search['name'] }}

{{ $search['country'] ?? 'International' }}
@endforeach
@endif @if (session('destination_selected'))

{{ session('destination_selected') }}

@endif @error('destination')

{{ $message }}

@enderror @if(session('selected_destination'))

Selected: {{ is_array(session('selected_destination')) ? session('selected_destination')['name'] : session('selected_destination') }}

Ready to continue to trip details

@endif