@php $totalBlocks = count($section->blocks); @endphp
@if ($section->settings->heading)

liveUpdate()->text('heading') }} > {{ $section->settings->heading }}

@endif
@foreach ($section->blocks as $index => $block) @php $isFirst = $index === 0; $classes = match (true) { $isFirst && $totalBlocks >= 3 => 'col-span-full md:col-span-2 row-span-full md:row-span-2', $isFirst => 'col-span-1 md:col-span-2 md:row-span-2', default => 'col-span-1 md:row-span-1', }; @endphp
@switch($block->type) @case('image') liveUpdate()->attr('image', 'src') }} > @break @case('product') @if ($block->settings->product) @else
Placeholder product image

Product sample

Product sample description

@endif @break @case('category') @if ($block->settings->category)
@if ($block->settings->category->banner_url) @else
{{ $block->settings->category->name }}
@endif
@else
Placeholder product image

Category sample

@endif @break @case('custom')
@if ($block->settings->image) liveUpdate()->attr('image', 'src') }} class="h-auto w-full object-cover" > @endif @if ($block->settings->title)

liveUpdate()->text('title') }}>{{ $block->settings->title }}

@endif @if ($block->settings->text)
liveUpdate()->html('text') }}> {!! $block->settings->text !!}
@endif @if ($block->settings->link) liveUpdate()->text('link_text')->attr('link', 'href') }} > {{ $block->settings->link_text }} @endif
@break @endswitch
@endforeach
@visual_design_mode @pushOnce('scripts') @endpushOnce @end_visual_design_mode