import { __exports as t } from "./index-LexicalHistoryPlugin.prod2.js";
import { __require as c } from "./index-LexicalComposerContext2.js";
import { __require as m } from "./index-LexicalHistory.js";
import p from "react";
var u;
function H() {
  if (u) return t;
  u = 1;
  var n = c(), i = m(), o = p;
  function l(e, r, s = 1e3) {
    let a = o.useMemo(() => r || i.createEmptyHistoryState(), [r]);
    o.useEffect(() => i.registerHistory(e, a, s), [s, e, a]);
  }
  return t.createEmptyHistoryState = i.createEmptyHistoryState, t.HistoryPlugin = function({ externalHistoryState: e }) {
    let [r] = n.useLexicalComposerContext();
    return l(r, e), null;
  }, t;
}
export {
  H as __require
};
