"use client";
import { GroupLabelContext } from './7HVFURXT.js';
import { createHook, forwardRef as forwardRef2, createElement } from './LMDWO4NN.js';
import { useId, useSafeLayoutEffect } 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 { useContext } from 'react';

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

export { useGroupLabel };
//# sourceMappingURL=YUOJWFSO.js.map
