@php $title = $data['title'] ?? 'Dúvidas Frequentes'; $subtitle = $data['subtitle'] ?? ''; $backgroundColor = $data['background_color'] ?? '#f8f9fa'; $items = $data['items'] ?? []; $renderText = function($text) { if (is_string($text) && (strpos($text, '{"type"') === 0 || strpos($text, '{"content"') === 0)) { return app(\V2\Services\ContentRichEditor\Services\ContentRichEditorRendererService::class)->toHtml($text); } return $text; }; @endphp @if($title || $subtitle) @if($subtitle) {{ $subtitle }} @endif @if($title) {{ $title }} @endif @endif @foreach($items as $index => $item) @php $faqId = "faq-item-{$section['id']}-{$index}"; $linkText = $item['link_text'] ?? ''; $linkUrl = $item['link_url'] ?? ''; @endphp {{-- Pergunta --}} {{ $item['question'] ?? 'Pergunta sem título' }} {{-- Resposta --}} {!! $renderText($item['answer'] ?? '') !!} @if(!empty($linkUrl)) {{ $linkText ?: 'Acessar Link' }} @endif @endforeach @section('other-scripts') @append