"use strict";
const React = require("react");
const classNames = require("../_util/classNames.js");
const util = require("./util.js");
const context = require("./context.js");
const indent = require("./indent.js");
const emotionReactJsxRuntime_browser_esm = require("../../../../../../@emotion_react@11.10.4_3toe27fv7etiytxb5kxc7fxaw4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");
function ItemGroup(props, ref) {
  var children = props.children, title = props.title, level = props.level, className = props.className, style = props.style;
  var _a = React.useContext(context), prefixCls = _a.prefixCls, levelIndent = _a.levelIndent;
  var childrenLevel = level === 1 ? level + 1 : level;
  var childrenList = util.processChildren(children, {
    level: childrenLevel
  });
  return /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs("div", {
    ref,
    className: classNames(prefixCls + "-group", className),
    style,
    children: [/* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsxs("div", {
      className: prefixCls + "-group-title",
      children: [/* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx(indent, {
        level,
        prefixCls,
        levelIndent
      }), /* @__PURE__ */ emotionReactJsxRuntime_browser_esm.jsx("span", {
        children: title
      })]
    }), childrenList]
  });
}
var ForwardRefItemGroup = React.forwardRef(ItemGroup);
var ItemGroupComponent = ForwardRefItemGroup;
ItemGroupComponent.displayName = "MenuItemGroup";
ItemGroupComponent.menuType = "MenuGroup";
const ItemGroup$1 = ItemGroupComponent;
module.exports = ItemGroup$1;
//# sourceMappingURL=item-group.js.map
