"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext");
const ApiPlugin = (props, ref) => {
    // HOOKS
    const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)();
    // EXPOSED METHODS
    (0, react_1.useImperativeHandle)(ref, () => ({
        focus: () => {
            editor.focus();
        }
    }));
    return null;
};
exports.default = (0, react_1.forwardRef)(ApiPlugin);
