"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PopoverContext = void 0;
exports.usePopoverContext = usePopoverContext;
var _react = require("react");
const PopoverContext = exports.PopoverContext = /*#__PURE__*/(0, _react.createContext)(null);
PopoverContext.displayName = 'PopoverContext';
function usePopoverContext() {
  const ctx = (0, _react.useContext)(PopoverContext);
  if (!ctx) {
    throw new Error('Popover components must be used within a <Popover.Root>');
  }
  return ctx;
}
//# sourceMappingURL=context.js.map