import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2019-2025 GoodData Corporation
import { createContext, useContext, useMemo } from "react";
/**
 * @alpha
 */
const DashboardEventsContext = createContext({
    registerHandler: () => { },
    unregisterHandler: () => { },
});
DashboardEventsContext.displayName = "DashboardEventsContext";
/**
 * @alpha
 */
export const useDashboardEventsContext = () => useContext(DashboardEventsContext);
/**
 * @internal
 */
export function DashboardEventsProvider({ children, registerHandler, unregisterHandler, }) {
    const value = useMemo(() => {
        return {
            registerHandler,
            unregisterHandler,
        };
    }, [registerHandler, unregisterHandler]);
    return _jsx(DashboardEventsContext.Provider, { value: value, children: children });
}
//# sourceMappingURL=DashboardEventsContext.js.map