{{-- @intent Bloco `text-image`: texto rico + imagem do catálogo Media (ADR-026), lado configurável. @description A ordem do DOM é texto → imagem (leitura previsível); o lado visual é só CSS (`md:flex-row-reverse`), sem posição absoluta e sem JS. --}} @use('Services\RichText\Contracts\RichTextRenderer') @props([ 'props' => [], 'media' => [], 'blockId' => null, ]) @php $title = is_string($props['title'] ?? null) ? $props['title'] : null; $ast = is_array($props['body'] ?? null) ? $props['body'] : null; $html = $ast !== null ? app(RichTextRenderer::class)->toHtml($ast) : ''; $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'] : ''; $side = is_string($props['image_side'] ?? null) ? $props['image_side'] : 'left'; $headingId = is_string($blockId) && $blockId !== '' ? preg_replace('/[^a-z0-9-]/', '', strtolower($blockId)).'-title' : null; @endphp @if ($title !== null && $html !== '')

{{ $title }}

$side === 'right', 'md:flex-row' => $side !== 'right', ])>
{!! $html !!}
@if ($image !== null)
@endif
@endif