import { defineComponent, computed, createVNode } from 'vue';
import '../../../utils/index.mjs';
import { useInjectMenu } from './hooks/useMenuContext.mjs';
import { useMeasure } from './hooks/useKeyPath.mjs';
import { menuItemGroupProps } from './props.mjs';
import { getPropsSlot } from '../../../utils/vue/props.mjs';

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

export { AItemGroup as default };
//# sourceMappingURL=ItemGroup.mjs.map
