import { useContext } from 'react';
import { PopoverNextContext } from '../PopoverNext.context';
export const usePopoverNextContext = () => {
    const context = useContext(PopoverNextContext);
    if (context === null) {
        throw new Error('<PopoverNext.Trigger /> and <PopoverNext.Content /> components must be wrapped with <PopoverNext />');
    }
    return context;
};
//# sourceMappingURL=usePopoverNextContext.js.map