"use client";
import { usePopoverProviderContext } from './MTZPJQMC.js';
import { createHook, forwardRef as forwardRef2, createElement } from './LMDWO4NN.js';
import { useMergeRefs } from './ABQUS43J.js';
import { __objRest, __spreadProps, __spreadValues } from './3YLGPPWQ.js';

// src/popover/popover-anchor.tsx
var TagName = "div";
var usePopoverAnchor = createHook(
  function usePopoverAnchor2(_a) {
    var _b = _a, { store } = _b, props = __objRest(_b, ["store"]);
    const context = usePopoverProviderContext();
    store = store || context;
    props = __spreadProps(__spreadValues({}, props), {
      ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref)
    });
    return props;
  }
);
forwardRef2(function PopoverAnchor2(props) {
  const htmlProps = usePopoverAnchor(props);
  return createElement(TagName, htmlProps);
});

export { usePopoverAnchor };
//# sourceMappingURL=OMU7RWRV.js.map
