'use strict';

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

var vue = require('vue');
var index$1 = require('../../_util/props-util/index.js');
var index = require('../../_util/vue-types/index.js');
var type = require('../../_util/type.js');
var useMenuContext = require('./hooks/useMenuContext.js');
var useKeyPath = require('./hooks/useKeyPath.js');

const menuItemGroupProps = () => ({
  title: index.default.any,
  // Internal user prop
  originItemValue: type.objectType()
});
var ItemGroup = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: false,
  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", vue.mergeProps(attrs, {
        "onClick": (e) => e.stopPropagation(),
        "class": groupPrefixCls.value
      }), [vue.createVNode("div", {
        "title": typeof props.title === "string" ? props.title : void 0,
        "class": `${groupPrefixCls.value}-title`
      }, [index$1.getPropsSlot(slots, props, "title")]), vue.createVNode("ul", {
        "class": `${groupPrefixCls.value}-list`
      }, [(_b = slots.default) == null ? void 0 : _b.call(slots)])]);
    };
  }
});

exports.default = ItemGroup;
exports.menuItemGroupProps = menuItemGroupProps;
//# sourceMappingURL=ItemGroup.js.map
