"use client";
import { useLexicalComposerContext as n } from "./LexicalComposerContext.prod.js";
import { createEmptyHistoryState as m, registerHistory as l } from "../history/LexicalHistory.prod.js";
import { useMemo as u, useEffect as c } from "react";
function H({ delay: s, externalHistoryState: i }) {
  const [a] = n();
  return (function(t, e, o = 1e3) {
    const r = u((() => e || m()), [e]);
    c((() => l(t, r, o)), [o, t, r]);
  })(a, i, s), null;
}
export {
  H as HistoryPlugin,
  m as createEmptyHistoryState
};
