import * as React from 'react';
export var PopoverContext = /*#__PURE__*/React.createContext({});

var usePopoverContext = function usePopoverContext() {
  var context = React.useContext(PopoverContext);

  if (context === null) {
    throw new Error('Popover components must be wrapped in <Popover />');
  }

  return context;
};

export default usePopoverContext;