"use client";
import * as React from "react";
import { useRenderElement } from "../../utils/useRenderElement.js";
import { MenuGroupContext } from "./MenuGroupContext.js";
import { jsx } from "react/jsx-runtime";
const MenuGroup = /* @__PURE__ */ React.forwardRef(function MenuGroup2(componentProps, forwardedRef) {
  const {
    render,
    className,
    ...elementProps
  } = componentProps;
  const [labelId, setLabelId] = React.useState(void 0);
  const context = React.useMemo(() => ({
    setLabelId
  }), [setLabelId]);
  const element = useRenderElement("div", componentProps, {
    ref: forwardedRef,
    props: {
      role: "group",
      "aria-labelledby": labelId,
      ...elementProps
    }
  });
  return /* @__PURE__ */ jsx(MenuGroupContext.Provider, {
    value: context,
    children: element
  });
});
if (process.env.NODE_ENV !== "production") MenuGroup.displayName = "MenuGroup";
export {
  MenuGroup
};
//# sourceMappingURL=MenuGroup.js.map
