import { __exports as t } from "./index-LexicalAutoFocusPlugin.dev2.js";
import { __require as s } from "./index-LexicalComposerContext2.js";
import a from "react";
var n;
function _() {
  if (n) return t;
  n = 1;
  var i = s(), c = a;
  function l({
    defaultSelection: r
  }) {
    const [e] = i.useLexicalComposerContext();
    return c.useEffect(() => {
      e.focus(() => {
        const u = document.activeElement, o = e.getRootElement();
        o !== null && (u === null || !o.contains(u)) && o.focus({
          preventScroll: !0
        });
      }, {
        defaultSelection: r
      });
    }, [r, e]), null;
  }
  return t.AutoFocusPlugin = l, t;
}
export {
  _ as __require
};
