import { ProviderContext } from 'notistack'; /** * Where the global snackbar helpers (`message.*`, `processAlertSnackBar`, the exported * `enqueueSnackbar`/`closeSnackbar`, …) render: the **oldest still-mounted** ui-core * `SnackbarProvider` (ASMA-8414). * * notistack's own module-level `enqueueSnackbar` is bound to the LAST constructed provider and is * never restored when that provider unmounts. `asma-ui-core` is a shared kernel lib, so the shell and * every app share one notistack, and every app widget mounts its own provider through `AppProviders`. * The most recently mounted widget therefore captured every global toast in the page; once it * unmounted (e.g. a widget embedded in a dialog that just closed on save), toasts already shown died * with it and every later one was enqueued into a dead provider — silently. * * The oldest live provider is the host's (shell / AdVoca), which outlives every widget. The registry is * **window-scoped** for the same reason as the open-modal-dialog registry in `useTopLayer.hook`: in a * plain `vite dev` each micro-frontend bundles its own copy of this module, but they all share one * `window`. */ type SnackbarHost = Pick; declare global { interface Window { __asmaSnackbarHosts__?: SnackbarHost[]; } } /** Register a mounted provider's context; returns its unregister. Mount order is preserved. */ export declare function registerSnackbarHost(host: SnackbarHost): () => void; export declare const enqueueSnackbar: ProviderContext["enqueueSnackbar"]; export declare const closeSnackbar: ProviderContext['closeSnackbar']; export {};