import { type ReactNode } from "react";
import { type IUiToast, type IUiToastOptions, type IUseUiToastResult, type UiToastKind } from "./types.js";
interface IUiToastContextValue {
    /** Currently shown toasts, oldest first. */
    toasts: IUiToast[];
    /**
     * Push a toast onto the queue and return its id. `text` is already
     * resolved by the consumer — see [[useUiToast]] for the wrapper that
     * runs `resolveText` against the consumer's `useIntl()`.
     */
    push: (kind: UiToastKind, text: string, options?: IUiToastOptions) => string;
    /** Dismiss one toast by id. */
    remove: (id: string) => void;
    /** Dismiss all toasts. */
    removeAll: () => void;
    /**
     * Whether this provider is nested inside another `UiToastProvider`. The
     * outermost provider renders the visible container; nested providers
     * forward through context so the topmost-only behaviour is preserved.
     */
    isNested: boolean;
}
/**
 * Mount once near the root of your app. Provides the toast queue + dismiss
 * timers consumed by `useUiToast` and `UiToastsContainer`. Nesting is safe
 * — only the outermost `<UiToastsContainer>` renders any visible toasts.
 *
 * Known limitation: if a root provider with in-flight toasts is **re-parented**
 * under a new outer provider mid-flight (e.g. the app rearranges its tree),
 * the inner instance's queue and timers don't migrate to the parent. Mount
 * the provider once at the stable app root to avoid this.
 *
 * @internal
 */
export declare function UiToastProvider({ children }: {
    children: ReactNode;
}): import("react/jsx-runtime").JSX.Element;
/**
 * Consumer hook. Resolves the toast message via the **caller's**
 * `useIntl()` so a consumer rendered under a nested `IntlProvider` formats
 * `MessageDescriptor` content with that subtree's locale, not the
 * provider's. Throws when called outside a `UiToastProvider`.
 *
 * @internal
 */
export declare function useUiToast(): IUseUiToastResult;
/**
 * @internal
 */
export declare const UiToastContextInternal: import("react").Context<IUiToastContextValue | null>;
export {};
//# sourceMappingURL=UiToastProvider.d.ts.map