{extends file="admin-layout.tpl"}

{block name="no-return-functions"}
    {$admin_current_location = 'TheliaBlocks'}
{/block}

{block name="page-title"}{intl l='Thelia blocks'}{/block}

{block name="check-resource"}admin.content{/block}
{block name="check-access"}view{/block}

{block name="main-content"}
    <div id="thelia-blocks-root-new" class="thelia-blocks-ui"></div>
{/block}

{block name="javascript-last-call"}
    {literal}
    <script type="module">
        let CONTAINER = document.getElementById("thelia-blocks-root-new");
        ReactDOM.render(React.createElement(TheliaBlocks.BlocksEditor, {
            apiUrl: window.THELIA_BLOCKS_API_ROOT,
            containerId: "thelia-blocks-root-new",
            groupId: null,
            locales: window.THELIA_BLOCKS_LOCALES,
            urlPrefix: window.THELIA_BLOCKS_URL_PREFIX,
        }, null), CONTAINER)
    </script>
    {/literal}
{/block}
