export async function analyseEdenEditors(eden) {
    const editorElements = Array.from(document.querySelectorAll("[data-eden-editor]"));
    const { default: Editor } = await import("../core/editor.js");
    const editors = await Promise.all(editorElements.map(async (editorElement) => {
        const editor = new Editor(editorElement, eden.templateDescriptors);
        await editor.analyse();
        return editor;
    }));
    eden.editors = editors;
}
export async function addEdenEditor(eden, editorElement) {
    const { default: Editor } = await import("../core/editor.js");
    const editor = new Editor(editorElement, eden.templateDescriptors);
    await editor.analyse();
    eden.editors.push(editor);
    return editor;
}
