"use client";
'use strict';

var F5MUBM3I = require('./F5MUBM3I.cjs');
var RS7LB2H4 = require('./RS7LB2H4.cjs');
var LMDWO4NN = require('./LMDWO4NN.cjs');
var _3YLGPPWQ = require('./3YLGPPWQ.cjs');
var DTR5TSDJ = require('../../../../../../@ariakit_core@0.4.15/node_modules/@ariakit/core/esm/__chunks/DTR5TSDJ.cjs');
var PBFD2E7P = require('../../../../../../@ariakit_core@0.4.15/node_modules/@ariakit/core/esm/__chunks/PBFD2E7P.cjs');

var TagName = "button";
var useDialogDisclosure = LMDWO4NN.createHook(
  function useDialogDisclosure2(_a) {
    var _b = _a, { store } = _b, props = _3YLGPPWQ.__objRest(_b, ["store"]);
    const context = RS7LB2H4.useDialogProviderContext();
    store = store || context;
    PBFD2E7P.invariant(
      store,
      process.env.NODE_ENV !== "production" && "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
    );
    const contentElement = store.useState("contentElement");
    props = _3YLGPPWQ.__spreadValues({
      "aria-haspopup": DTR5TSDJ.getPopupRole(contentElement, "dialog")
    }, props);
    props = F5MUBM3I.useDisclosure(_3YLGPPWQ.__spreadValues({ store }, props));
    return props;
  }
);
LMDWO4NN.forwardRef(function DialogDisclosure2(props) {
  const htmlProps = useDialogDisclosure(props);
  return LMDWO4NN.createElement(TagName, htmlProps);
});

exports.useDialogDisclosure = useDialogDisclosure;
//# sourceMappingURL=NTITENHD.cjs.map
