{{-- @intent Bloco `hero` (catálogo fechado — emenda ADR-016): abertura da página com o **único** `

` permitido na composição. @description Fragmento semântico puro (sem editor, sem JS). Os dados chegam sanitizados pelo `Layout\Blocks\BlocksSchema`; a mídia é resolvida pelo chamador (id Media → ``, ADR-026). Sem JS, a imagem e o CTA continuam funcionando. --}} @props([ 'props' => [], 'media' => [], 'blockId' => null, ]) @php $title = is_string($props['title'] ?? null) ? $props['title'] : null; $lead = is_string($props['lead'] ?? null) ? $props['lead'] : null; $cta = is_array($props['cta'] ?? null) && is_string($props['cta']['label'] ?? null) && is_string($props['cta']['url'] ?? null) ? $props['cta'] : null; // Caminho interno recebe o locale vigente; URL externa é externa (ADR-012). $ctaHref = null; if ($cta !== null) { $ctaHref = str_starts_with($cta['url'], '/') ? localized_url($cta['url']) : $cta['url']; } $image = is_array($media['image'] ?? null) && is_string($media['image']['path'] ?? null) ? $media['image'] : null; $alt = is_string($props['image_alt'] ?? null) ? $props['image_alt'] : ''; $headingId = is_string($blockId) && $blockId !== '' ? preg_replace('/[^a-z0-9-]/', '', strtolower($blockId)).'-title' : null; @endphp @if ($title !== null)

{{ $title }}

@if ($lead !== null)

{{ $lead }}

@endif @if ($cta !== null)

{{ $cta['label'] }}

@endif
@if ($image !== null) @endif
@endif