"use strict";

import { createContext, useContext } from 'react';
export const PopoverContext = /*#__PURE__*/createContext(null);
PopoverContext.displayName = 'PopoverContext';
export function usePopoverContext() {
  const ctx = useContext(PopoverContext);
  if (!ctx) {
    throw new Error('Popover components must be used within a <Popover.Root>');
  }
  return ctx;
}
//# sourceMappingURL=context.js.map