{{-- @intent Bloco `steps`: passo a passo ordenado (ex.: como solicitar um serviço). @description `
    ` semântico com títulos em `

    `; a ordem é a do documento e funciona sem JS. --}} @props([ 'props' => [], 'media' => [], 'blockId' => null, ]) @php $title = is_string($props['title'] ?? null) ? $props['title'] : null; $items = []; foreach (is_array($props['items'] ?? null) ? $props['items'] : [] as $item) { if (! is_array($item) || ! is_string($item['title'] ?? null)) { continue; } $items[] = [ 'title' => $item['title'], 'body' => is_string($item['body'] ?? null) ? $item['body'] : null, ]; } $headingId = is_string($blockId) && $blockId !== '' ? preg_replace('/[^a-z0-9-]/', '', strtolower($blockId)).'-title' : null; @endphp @if ($title !== null && $items !== [])

    {{ $title }}

      @foreach ($items as $item)
    1. {{ $item['title'] }}

      @if ($item['body'] !== null)

      {{ $item['body'] }}

      @endif
    2. @endforeach
    @endif