/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b04eed0 | Cube Dev Team */
import { createContext, useContext } from "react";

//#region src/components/overlays/Notifications/NotificationContext.ts
const ToastContext = createContext(null);
/**
* Internal context for overlay notification machinery.
* Not exported publicly — consumers should use `useNotifications` hook.
*/
const NotificationContext = createContext(null);
/**
* Public context for persistent notifications.
* Used by `usePersistentNotifications` and `useNotificationsCount` hooks.
*/
const PersistentNotificationsContext = createContext(null);
function useToastContext() {
	const context = useContext(ToastContext);
	if (!context) throw new Error("useToastContext must be used within an OverlayProvider");
	return context;
}
function useNotificationContext() {
	const context = useContext(NotificationContext);
	if (!context) throw new Error("useNotificationContext must be used within an OverlayProvider");
	return context;
}
function usePersistentNotificationsContext() {
	const context = useContext(PersistentNotificationsContext);
	if (!context) throw new Error("usePersistentNotificationsContext must be used within an OverlayProvider");
	return context;
}

//#endregion
export { NotificationContext, PersistentNotificationsContext, ToastContext, useNotificationContext, usePersistentNotificationsContext, useToastContext };
//# sourceMappingURL=NotificationContext.js.map