@props([
    'active' => null,
    'blocks' => null,
    'item' => null,
    'originalItem' => null,
    'suffix' => '',
])

@php
    if(empty($blocks))
        $blocks = $item->getBlocks($active);
    
    if (empty($blocks)) {
        $blocks = $item->getRequiredBlocks();
    }
@endphp

@foreach ($blocks as $block)

    @if(!empty(config('backslash4.tenants-on',0)))
        @includeFirst([
            \Clevercherry\Backslash4\Backslash4::getTenantNamespace().'::components.blocks.'.$block->type,
            'components.blocks.'.$block->type,
            'backslash4::components.blocks.'.$block->type,
            'backslash4::components.blocks.no-block-found'])
    @else
        @includeFirst(['components.blocks.'.$block->type,
            'backslash4::components.blocks.'.$block->type,
            'backslash4::components.blocks.no-block-found'])
    @endif

@endforeach
