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