import p from "../../@babel/runtime/helpers/esm/extends.mjs";
import s from "../../@babel/runtime/helpers/esm/objectWithoutProperties.mjs";
import d from "../../classnames/index.mjs";
import v from "../../rc-util/es/omit.mjs";
import * as r from "react";
import { MenuContext as f } from "./context/MenuContext.mjs";
import { useFullPath as h, useMeasure as x } from "./context/PathContext.mjs";
import { parseChildren as C } from "./utils/commonUtil.mjs";
var N = ["className", "title", "eventKey", "children"], y = ["children"], P = function(e) {
  var n = e.className, t = e.title;
  e.eventKey;
  var o = e.children, i = s(e, N), c = r.useContext(f), m = c.prefixCls, l = "".concat(m, "-item-group");
  return /* @__PURE__ */ r.createElement("li", p({
    role: "presentation"
  }, i, {
    onClick: function(u) {
      return u.stopPropagation();
    },
    className: d(l, n)
  }), /* @__PURE__ */ r.createElement("div", {
    role: "presentation",
    className: "".concat(l, "-title"),
    title: typeof t == "string" ? t : void 0
  }, t), /* @__PURE__ */ r.createElement("ul", {
    role: "group",
    className: "".concat(l, "-list")
  }, o));
};
function b(a) {
  var e = a.children, n = s(a, y), t = h(n.eventKey), o = C(e, t), i = x();
  return i ? o : /* @__PURE__ */ r.createElement(P, v(n, ["warnKey"]), o);
}
export {
  b as default
};
