@props(['events' => []]) @php $currentPath = request()->path(); $segments = explode('/', $currentPath); $slug = end($segments); $ubicacion = empty($slug) ? env('APP_PAIS', 'eventos') : $slug; // Definir si la pestaña 'Todos' está activa $isTodosActive = $slug === env('APP_PAIS', 'eventos') || empty($slug); // Crear un array que incluya 'Todos' y todos los artistas $tabs = collect([ [ 'name' => 'Todos', 'slug' => null, 'route' => route('home.todos'), ], ])->merge( collect($events['artistas'])->map(function ($festividad) use ($ubicacion) { return [ 'name' => ucfirst(strtolower($festividad['name'])), 'slug' => $festividad['slug'], 'route' => route('detalle-highlight', [ 'ubicacion' => $ubicacion, 'slug_highlight' => $festividad['slug'], ]), ]; }), ); @endphp
@foreach ($tabs as $tab) @endforeach
{{--

Eventos

@foreach (array_slice($events['proximos']['data'], 0, 8) as $event)
{{ \Carbon\Carbon::parse($event['fecha_evento'])->format('d/m/Y') }} • {{ \Carbon\Carbon::parse($event['hora_evento'])->format('g:i A') }}
{{ $event['product_categorie']['category']['name'] }}

{{ $event['title_small'] }}

{{ $event['address'] }}

Desde S/{{ number_format($event['price_partner'], 2) }}

@endforeach
--}} {{-- Home Group --}} {{--
@foreach ($events['homeGroups'] as $event) @if ($event['id'] == 1 || ($event['id'] != 1 && $event['products'] && count($event['products']) > 0))

{{ $event['title'] }}

@if ($event['id'] == 1 && $events['destacados'] && count($events['destacados']) > 0)
@foreach ($events['destacados']['data'] as $destacados)
{{ \Carbon\Carbon::parse($destacados['fecha_evento'])->format('d/m/Y') }} • {{ \Carbon\Carbon::parse($destacados['hora_evento'])->format('g:i A') }}
{{ $destacados['product_categorie']['category']['name'] }}

{{ $destacados['title_small'] }}

{{ $destacados['address'] }}

Desde S/{{ number_format($destacados['price_partner'], 2) }}

@endforeach
@else
@foreach ($event['products'] as $product)
{{ \Carbon\Carbon::parse($product['fecha_evento'])->format('d/m/Y') }} • {{ \Carbon\Carbon::parse($product['hora_evento'])->format('g:i A') }}
{{ $product['product_categorie']['category']['name'] }}

{{ $product['title_small'] }}

{{ $product['address'] }}

Desde S/{{ number_format($product['price_partner'], 2) }}

@endforeach
@endif @endif @endforeach

Próximos eventos

@foreach (array_slice($events['destacados']['data'], 0, 4) as $event)
{{ \Carbon\Carbon::parse($event['fecha_evento'])->format('d/m/Y') }} • {{ \Carbon\Carbon::parse($event['hora_evento'])->format('g:i A') }}
{{ $event['product_categorie']['category']['name'] }}

{{ $event['title_small'] }}

{{ $event['address'] }}

Desde S/{{ number_format($event['price_partner'], 2) }}

@endforeach

Otros eventos

@foreach (array_slice($events['more_events'], 0, 4) as $event)
{{ \Carbon\Carbon::parse($event['fecha_evento'])->format('d/m/Y') }} • {{ \Carbon\Carbon::parse($event['hora_evento'])->format('g:i A') }}
{{ $event['product_categorie']['category']['name'] }}

{{ $event['title_small'] }}

{{ $event['address'] }}

Desde S/{{ number_format($event['price_partner'], 2) }}

@endforeach
--}} {{--
--}}