import { GroupLabelContext } from './7HVFURXT.js';
import { createHook, forwardRef as forwardRef2, createElement } from './LMDWO4NN.js';
import { useWrapElement } from './ABQUS43J.js';
import { __spreadValues } from './3YLGPPWQ.js';
import { removeUndefinedValues } from '../../../../../../@ariakit_core@0.4.15/node_modules/@ariakit/core/esm/__chunks/PBFD2E7P.js';
import { useState } from 'react';
import { j as jsxRuntimeExports } from '../../../../../../react@18.2.0/node_modules/react/jsx-runtime.js';

var TagName = "div";
var useGroup = createHook(
  function useGroup2(props) {
    const [labelId, setLabelId] = useState();
    props = useWrapElement(
      props,
      (element) => /* @__PURE__ */ jsxRuntimeExports.jsx(GroupLabelContext.Provider, { value: setLabelId, children: element }),
      []
    );
    props = __spreadValues({
      role: "group",
      "aria-labelledby": labelId
    }, props);
    return removeUndefinedValues(props);
  }
);
forwardRef2(function Group2(props) {
  const htmlProps = useGroup(props);
  return createElement(TagName, htmlProps);
});

export { useGroup };
//# sourceMappingURL=36LIF33V.js.map
