@props(['page']) @php $sections = $page->sections; @endphp @if($sections->isEmpty())

No content available.

@else @foreach($sections as $section) @php $content = $section->content ?? []; $sectionName = $section->section_name; @endphp @switch($sectionName) @case('hero')
@if(isset($content['title']))

{{ $content['title'] }}

@endif @if(isset($content['subtitle']))

{{ $content['subtitle'] }}

@endif @if(isset($content['button_text'])) {{ $content['button_text'] }} @endif
@break @case('features')
@if(isset($content['title']))

{{ $content['title'] }}

@endif
@for($i = 1; $i <= 3; $i++) @if(isset($content["feature_{$i}_title"]))
@if(isset($content["feature_{$i}_icon"]))
{{ $content["feature_{$i}_icon"] }}
@endif

{{ $content["feature_{$i}_title"] }}

{{ $content["feature_{$i}_description"] ?? '' }}

@endif @endfor
@break @case('about')
@if(isset($content['image']))
About
@endif
@if(isset($content['title']))

{{ $content['title'] }}

@endif @if(isset($content['content']))

{{ $content['content'] }}

@endif
@break @case('cta')
@if(isset($content['title']))

{{ $content['title'] }}

@endif @if(isset($content['subtitle']))

{{ $content['subtitle'] }}

@endif @if(isset($content['button_text'])) {{ $content['button_text'] }} @endif
@break @case('contact')
@if(isset($content['title']))

{{ $content['title'] }}

@endif @if(isset($content['email']))

Email: {{ $content['email'] }}

@endif @if(isset($content['phone']))

Phone: {{ $content['phone'] }}

@endif @if(isset($content['address']))

Address: {{ $content['address'] }}

@endif
@break @case('text')
@if(isset($content['title']))

{{ $content['title'] }}

@endif @if(isset($content['content']))
{!! nl2br(e($content['content'])) !!}
@endif
@break @default
@if(isset($content['title']))

{{ $content['title'] }}

@endif
{{ json_encode($content, JSON_PRETTY_PRINT) }}
@endswitch @endforeach @endif