/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-45e7184
 * Released under the MIT license.
 */

import { createContext, useContext } from 'react';
// ─── Contexts ─────────────────────────────────────────────────────────
export const ToastContext = createContext(null);
/**
 * Internal context for overlay notification machinery.
 * Not exported publicly — consumers should use `useNotifications` hook.
 */
export const NotificationContext = createContext(null);
/**
 * Public context for persistent notifications.
 * Used by `usePersistentNotifications` and `useNotificationsCount` hooks.
 */
export const PersistentNotificationsContext = createContext(null);
// ─── Context Hooks ────────────────────────────────────────────────────
export function useToastContext() {
    const context = useContext(ToastContext);
    if (!context) {
        throw new Error('useToastContext must be used within an OverlayProvider');
    }
    return context;
}
export function useNotificationContext() {
    const context = useContext(NotificationContext);
    if (!context) {
        throw new Error('useNotificationContext must be used within an OverlayProvider');
    }
    return context;
}
export function usePersistentNotificationsContext() {
    const context = useContext(PersistentNotificationsContext);
    if (!context) {
        throw new Error('usePersistentNotificationsContext must be used within an OverlayProvider');
    }
    return context;
}

        