{{-- @intent Bloco `latest-news`: últimas notícias pelo **widget do módulo dono** (ADR-016). @description O bloco não consulta Notícias (embed permitido, import proibido — ADR-013): pede a fonte `noticias.ultimas` ao `WidgetRegistry`. Sem a fonte registrada (módulo desativado/ausente) a seção inteira não aparece — nunca um título vazio nem 500. --}} @use('Core\Contracts\WidgetRegistry') @props([ 'props' => [], 'media' => [], 'blockId' => null, ]) @php $title = is_string($props['title'] ?? null) ? $props['title'] : null; $source = is_string($props['source'] ?? null) ? $props['source'] : null; // `get()` respeita módulo inativo (fail-open — ADR-034): sem fonte resolvida, nada é exibido. $available = $source !== null && app(WidgetRegistry::class)->get($source) !== null; $headingId = is_string($blockId) && $blockId !== '' ? preg_replace('/[^a-z0-9-]/', '', strtolower($blockId)).'-title' : null; @endphp @if ($title !== null && $source !== null && $available)

{{ $title }}

@endif