import { __exports as i } from "./index-LexicalListPlugin.prod2.js";
import { __require as L } from "./index-LexicalList2.js";
import { __require as m } from "./index-LexicalComposerContext2.js";
import a from "react";
import { __require as l } from "./index-LexicalUtils.js";
import { __require as R } from "./index-Lexical.js";
var s;
function C() {
  if (s) return i;
  s = 1;
  var r = L(), u = m(), o = a, _ = l(), t = R();
  function n(e) {
    o.useEffect(() => _.mergeRegister(e.registerCommand(r.INSERT_ORDERED_LIST_COMMAND, () => (r.insertList(e, "number"), !0), t.COMMAND_PRIORITY_LOW), e.registerCommand(r.INSERT_UNORDERED_LIST_COMMAND, () => (r.insertList(e, "bullet"), !0), t.COMMAND_PRIORITY_LOW), e.registerCommand(r.REMOVE_LIST_COMMAND, () => (r.removeList(e), !0), t.COMMAND_PRIORITY_LOW), e.registerCommand(t.INSERT_PARAGRAPH_COMMAND, () => !!r.$handleListInsertParagraph(), t.COMMAND_PRIORITY_LOW)), [e]);
  }
  return i.ListPlugin = function() {
    let [e] = u.useLexicalComposerContext();
    return o.useEffect(() => {
      if (!e.hasNodes([r.ListNode, r.ListItemNode])) throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
    }, [e]), n(e), null;
  }, i;
}
export {
  C as __require
};
