import { forwardRef, useImperativeHandle } from 'react';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
const ApiPlugin = (props, ref) => {
    // HOOKS
    const [editor] = useLexicalComposerContext();
    // EXPOSED METHODS
    useImperativeHandle(ref, () => ({
        focus: () => {
            editor.focus();
        }
    }));
    return null;
};
export default forwardRef(ApiPlugin);
