@props([ 'accordionId' => 'accordion-mapa', 'items' => [], 'openFirst' => true, 'blockClass' => 'mapa-do-site-block', ])
@foreach ($items as $index => $item) @php $collapseId = $accordionId . '-' . ($item['id'] ?? 'item-' . $index); $links = $item['links'] ?? []; $displayedCount = count($links); $totalCount = $item['totalCount'] ?? $displayedCount; $isTruncated = !empty($item['truncated']) && $totalCount > $displayedCount; $isOpen = $openFirst && $index === 0; $showMoreLink = $isTruncated && !empty($item['moreUrl']); @endphp
@if (!empty($item['description']))

{{ $item['description'] }}

@endif @if ($showMoreLink)
{{ $item['moreLabel'] ?? __('Ver mais') }}

{{ __('Exibindo as :limit mais recentes de :total no mapa.', [ 'limit' => number_format($displayedCount, 0, ',', '.'), 'total' => number_format($totalCount, 0, ',', '.'), ]) }}

@endif
@endforeach