import { __exports as i } from "./index-LexicalListPlugin.dev2.js";
import { __require as L } from "./index-LexicalList2.js";
import { __require as l } from "./index-LexicalComposerContext2.js";
import m from "react";
import { __require as R } from "./index-LexicalUtils.js";
import { __require as c } from "./index-Lexical.js";
var a;
function g() {
  if (a) return i;
  a = 1;
  var r = L(), n = l(), s = m, u = R(), t = c();
  function o(e) {
    s.useEffect(() => u.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]);
  }
  function _() {
    const [e] = n.useLexicalComposerContext();
    return s.useEffect(() => {
      if (!e.hasNodes([r.ListNode, r.ListItemNode]))
        throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
    }, [e]), o(e), null;
  }
  return i.ListPlugin = _, i;
}
export {
  g as __require
};
