import { createContext, useContext } from 'react';

// Create context
const PopoverContext = createContext(undefined);
// Custom hook for consuming context
const usePopoverContext = () => {
    const context = useContext(PopoverContext);
    if (context === undefined) {
        throw new Error("usePopoverContext must be used within a Popover component");
    }
    return context;
};

export { PopoverContext, usePopoverContext };
