@php $ast = isset($ast) ? $ast : null; @endphp @php $htmlContent = ''; if (!empty($ast)) { try { $renderer = app(\V2\Services\ContentRichEditor\Services\ContentRichEditorRendererService::class); $htmlContent = $renderer->toHtml($ast); } catch (\Exception $e) { \Log::error('[ContentRichEditor] Falha ao renderizar AST', [ 'error' => $e->getMessage() ]); } } @endphp @if(!empty($htmlContent)) @include('v2-service-contentricheditor::components.partials.viewer-styles') @include('v2-service-contentricheditor::components.partials.viewer-header') @include('v2-service-contentricheditor::components.partials.viewer-body') @include('v2-service-contentricheditor::components.partials.viewer-footer') @include('v2-service-contentricheditor::components.partials.viewer-scripts') @endif