@props([
    'active' => null,
    'item' => null
])
{{-- this is obsolete and mainatained for backward compatibility --}}
{{-- use <x-bs-blocks.render :item=$item active="1" /> --}}
@php
    $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