@extends('layouts.public') @php $name = $item->name ?? $item->title ?? str($slug)->replace('-', ' ')->title(); $desc = $item->description ?? $item->summary ?? 'Informações oficiais validadas pelo município.'; $categoryName = $item->category->name ?? (is_string($item->category ?? null) ? ucfirst($item->category) : null); $municipalityName = $currentTenant->nome ?? 'Município'; $municipalityState = $currentTenant->uf ?? null; $locationFallback = $municipalityState ? $municipalityName.' — '.$municipalityState : $municipalityName; $location = $item->address ? $item->address . ($item->neighborhood ? ' — ' . $item->neighborhood : '') : ($item->location_name ?? $item->neighborhood ?? $locationFallback); $mediaItems = collect($item->midias ?? []); if ($mediaItems->isEmpty() && isset($item->itens)) { $mediaItems = collect($item->itens) ->flatMap(fn ($routeItem) => $routeItem->atrativo?->midias ?? collect()) ->values(); } $singleImage = $item->imagem_capa ?? $item->imagem_url ?? null; $singleImageUrl = $singleImage ? (\Illuminate\Support\Str::startsWith($singleImage, ['http://', 'https://', '/']) ? $singleImage : asset('storage/'.$singleImage)) : null; $fallbackImage = asset('images/rota-viva-hero.webp'); @endphp @section('title', $name . ' — ' . $catalogTitle) @section('description', Str::limit($desc, 150)) @section('content')

← {{ $catalogTitle }} @if ($categoryName) · {{ $categoryName }} @endif

{{ $name }}

{{ $catalogDescription }}

@if (!empty($item->has_seal_of_quality))
★ Estabelecimento com Selo de Qualidade Municipal
@endif
@if ($mediaItems->isNotEmpty()) @elseif ($singleImageUrl) @else @endif

Sobre este atrativo

Informações Oficiais

{{ $desc }}

{{-- Informações de Destaque / Metadados --}}

Detalhes da Visita

Localização 📍 {{ $location }}
@if (isset($item->duration_minutes) || isset($item->total_duration_minutes))
Duração sugerida ⏱ {{ $item->duration_minutes ?? $item->total_duration_minutes }} minutos
@endif @if (isset($item->average_cost))
Custo médio 💵 {{ $item->average_cost > 0 ? 'R$ '.number_format($item->average_cost, 2, ',', '.') : 'Gratuito' }}
@elseif (isset($item->price_range))
Faixa de Preço 💵 {{ $item->price_range }}
@endif @if (isset($item->is_outdoor))
Ambiente {{ $item->is_outdoor ? '☀️ Ao ar livre' : '🏠 Espaço Coberto / Protegido' }}
@endif
{{-- Recursos de Acessibilidade --}} @if (!empty($item->accessibilityFeatures) && count($item->accessibilityFeatures) > 0)

Acessibilidade e Inclusão

@foreach ($item->accessibilityFeatures as $feature) ✓ {{ $feature->name }} @endforeach
@endif {{-- Tags / Palavras-chave --}} @if (!empty($item->tags) && is_array($item->tags))

Destaques e Tags

@foreach ($item->tags as $tag) #{{ $tag }} @endforeach
@endif {{-- Contatos e Ações --}} @if (!empty($item->whatsapp) || !empty($item->phone) || !empty($item->instagram) || !empty($item->website))
@if (!empty($item->whatsapp)) Falar no WhatsApp @endif @if (!empty($item->phone)) 📞 {{ $item->phone }} @endif @if (!empty($item->website)) 🌐 Visitar site @endif
@endif ← Voltar para {{ str($catalogTitle)->lower() }}
@endsection