'use strict';

var _7HVFURXT = require('./7HVFURXT.cjs');
var LMDWO4NN = require('./LMDWO4NN.cjs');
var ABQUS43J = require('./ABQUS43J.cjs');
var _3YLGPPWQ = require('./3YLGPPWQ.cjs');
var PBFD2E7P = require('../../../../../../@ariakit_core@0.4.15/node_modules/@ariakit/core/esm/__chunks/PBFD2E7P.cjs');
var React = require('react');

var TagName = "div";
var useGroupLabel = LMDWO4NN.createHook(
  function useGroupLabel2(props) {
    const setLabelId = React.useContext(_7HVFURXT.GroupLabelContext);
    const id = ABQUS43J.useId(props.id);
    ABQUS43J.useSafeLayoutEffect(() => {
      setLabelId == null ? void 0 : setLabelId(id);
      return () => setLabelId == null ? void 0 : setLabelId(void 0);
    }, [setLabelId, id]);
    props = _3YLGPPWQ.__spreadValues({
      id,
      "aria-hidden": true
    }, props);
    return PBFD2E7P.removeUndefinedValues(props);
  }
);
LMDWO4NN.forwardRef(function GroupLabel2(props) {
  const htmlProps = useGroupLabel(props);
  return LMDWO4NN.createElement(TagName, htmlProps);
});

exports.useGroupLabel = useGroupLabel;
//# sourceMappingURL=YUOJWFSO.cjs.map
