<?php

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound -- APD is the established namespace shared with the Pro add-on and retained for backward compatibility.
namespace APD\Gutenberg;

use APD\Admin\AdminSettings;
use APD\Front\Renderer;
use APD\Front\ShortcodeController;

defined('ABSPATH') || exit;

class BlockRender
{
    public function render(array $attributes = []) : string
    {
        $renderer = new Renderer(new \APD\Front\FrontContextBuilder());
        return (new ShortcodeController($renderer, new AdminSettings()))->render($attributes);
    }
}
