import { BlockNoteEditor, } from "@endexai/blocknote-core";
import { useMemo } from "react";
/**
 * Main hook for importing a BlockNote editor into a React project
 *
 * TODO: document in docs
 */
export const useCreateBlockNote = (options = {}, deps = []) => {
    return useMemo(() => {
        const editor = BlockNoteEditor.create(options);
        if (window) {
            // for testing / dev purposes
            window.ProseMirror = editor._tiptapEditor;
        }
        return editor;
    }, deps); //eslint-disable-line react-hooks/exhaustive-deps
};
/**
 * @deprecated use useCreateBlockNote instead
 */
export const useBlockNote = useCreateBlockNote;
//# sourceMappingURL=useCreateBlockNote.js.map