'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../../utils/index.cjs');
var useMenuContext = require('./hooks/useMenuContext.cjs');
var useKeyPath = require('./hooks/useKeyPath.cjs');
var props = require('./props.cjs');
var props$1 = require('../../../utils/vue/props.cjs');

var AItemGroup = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: false,
  props: props.menuItemGroupProps(),
  slots: Object,
  setup(props, {
    slots,
    attrs
  }) {
    const {
      prefixCls
    } = useMenuContext.useInjectMenu();
    const groupPrefixCls = vue.computed(() => `${prefixCls.value}-item-group`);
    const isMeasure = useKeyPath.useMeasure();
    return () => {
      var _a, _b;
      if (isMeasure)
        return (_a = slots.default) == null ? void 0 : _a.call(slots);
      return vue.createVNode("li", {
        ...attrs,
        "onClick": (e) => e.stopPropagation(),
        "class": groupPrefixCls.value
      }, [vue.createVNode("div", {
        "title": typeof props.title === "string" ? props.title : void 0,
        "class": `${groupPrefixCls.value}-title`
      }, [props$1.getPropsSlot(slots, props, "title")]), vue.createVNode("ul", {
        "class": `${groupPrefixCls.value}-list`
      }, [(_b = slots.default) == null ? void 0 : _b.call(slots)])]);
    };
  }
});

exports.default = AItemGroup;
//# sourceMappingURL=ItemGroup.cjs.map
