export async function showEditorUi(editor) {
    if (!editor.blocks) {
        return;
    }
    hideEditorUi(editor);
    const isEmpty = editor.blocks.length === 0;
    if (!editor.isReadOnly && isEmpty) {
        const { default: EdenEditorUi } = await import("../../user-interface/editor/eden-editor-ui.js");
        editor.ui = new EdenEditorUi(editor, {
            addBlock: editor.create,
            paste: editor.paste,
        }, editor.templates);
        editor.element.appendChild(editor.ui);
    }
}
export function hideEditorUi(editor) {
    if (editor.ui !== undefined) {
        editor.ui.remove();
    }
}
