{{-- Inputs for ONE block type. $type required; $block optional (prefill on edit). --}} @php $d = isset($block) ? ($block->data ?? []) : []; $inp = 'w-full px-3 py-2.5 bg-surface-container rounded-lg border-none focus:ring-2 focus:ring-primary/20 text-body-md outline-none'; $lbl = 'block text-label-md font-label-md text-outline uppercase tracking-wide mb-1.5'; @endphp @switch($type) @case('paragraph') @break @case('heading')
@break @case('image') @if(data_get($d, 'path')) @endif
@break @case('text_image') @if(data_get($d, 'path'))@endif
@break @case('video')
@if(data_get($d, 'path'))

Current video uploaded.

@endif
@break @case('callout')
@break @case('divider')

A horizontal divider line. No settings needed.

@break @case('accordion')
@php $items = data_get($d, 'items', [['title' => '', 'body' => '', 'image' => null]]); @endphp @foreach($items as $item)
@if(data_get($item, 'image'))@endif
@endforeach
@break @case('carousel')
@php $slides = data_get($d, 'slides', [['image' => null, 'title' => '', 'caption' => '']]); @endphp @foreach($slides as $slide)
@if(data_get($slide, 'image'))@endif
@endforeach
@break @case('flip_card')
@break @case('knowledge_check')
@php $opts = data_get($d, 'options', [['text' => '', 'correct' => true], ['text' => '', 'correct' => false]]); @endphp @foreach($opts as $i => $opt)
@endforeach
@break @endswitch