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