import { AccessibilityProps } from '../shared/index.js';

type ToastVariant = 'default' | 'success' | 'error' | 'warning';
/** Get the icon name for a toast variant (colorblind-safe: meaning not conveyed by color alone) */
declare function getToastIcon(variant: ToastVariant): string;
interface ToastProps {
    /** Visual variant */
    variant?: ToastVariant;
    /** Auto-dismiss duration in ms (default: 3000). Set to 0 to disable. */
    duration?: number;
    /** Whether the toast is open (controlled) */
    open?: boolean;
    /** Callback when open state changes */
    onOpenChange?: (open: boolean) => void;
}
interface ToastState {
    open: boolean;
    variant: ToastVariant;
}
interface ToastAPI {
    /** Current toast state */
    state: ToastState;
    /** ARIA attributes for the toast element */
    ariaProps: Partial<AccessibilityProps>;
    /** Dismiss the toast */
    dismiss(): void;
    /** Start the auto-dismiss timer */
    startTimer(): void;
    /** Pause the auto-dismiss timer (e.g. on hover) */
    pauseTimer(): void;
    /** Resume the auto-dismiss timer */
    resumeTimer(): void;
}
declare function createToast(props?: ToastProps): ToastAPI;
/** Entry in the toast manager */
interface ToastEntry {
    id: string;
    message: string;
    variant: ToastVariant;
    duration: number;
    createdAt: number;
}
interface ToastManagerAPI {
    /** Add a new toast. Returns the toast id. */
    toast(message: string, opts?: {
        variant?: ToastVariant;
        duration?: number;
    }): string;
    /** Dismiss a toast by id */
    dismiss(id: string): void;
    /** Current toast list (read-only) */
    readonly toasts: ReadonlyArray<ToastEntry>;
    /** Subscribe to toast list changes. Returns unsubscribe function. */
    subscribe(fn: (toasts: ReadonlyArray<ToastEntry>) => void): () => void;
}
declare function createToastManager(): ToastManagerAPI;

declare const toastVariants: (props?: ({
    variant?: "default" | "success" | "error" | "warning" | undefined;
} & {
    className?: string;
}) | undefined) => string;

export { type ToastAPI, type ToastEntry, type ToastManagerAPI, type ToastProps, type ToastState, type ToastVariant, createToast, createToastManager, getToastIcon, toastVariants };
