import { jsx } from "react/jsx-runtime";
import { cloneDeep } from "lodash-es";
import { defaultEditorConfig } from "./field/config/default.js";
import { defaultExtensionsList } from "./field/config/default-extensions.js";
import { RichTextField } from "./richtext-field.js";
function lexicalEditor(configure) {
    let baked;
    if (configure) {
        const seed = {
            ...cloneDeep(defaultEditorConfig),
            extensions: defaultExtensionsList()
        };
        baked = configure(seed);
    }
    const ConfiguredEditor = (props)=>/*#__PURE__*/ jsx(RichTextField, {
            ...props,
            editorConfig: baked
        });
    return ConfiguredEditor;
}
export { lexicalEditor };
