import type { ThemeDark, ThemeLight } from '../../common'; import type { Sentiment } from '../../SentimentSurface'; import type { SnackbarAction, SnackbarDuration } from './Snackbar.types'; /** * Props for the controlled Snackbar surface, including provider-managed lifecycle controls. * Use SnackbarCreationProps when creating notifications through SnackbarProvider/useSnackbar. */ export interface SnackbarProps { /** One optional callback or navigation action. Activating it dismisses after its callback runs. */ action?: SnackbarAction; /** Changes for each new Snackbar so LiveRegion re-announces it. */ announcementKey: number; /** * Controls auto-dismiss with a four-second, six-second or indefinite duration after entry finishes. * Takes precedence over the deprecated `timeout`. * When neither option is supplied, the default is 4000ms (previously 4500ms). * @default 'default' */ duration?: SnackbarDuration; /** * Replaces the media with a progress indicator, uses neutral styling and prevents auto-dismiss. * Takes precedence over `media`, `sentiment`, `duration` and the deprecated `timeout`. * @default false */ loading?: boolean; /** Overrides sentiment-derived media with content for the 24×24px media slot. */ media?: React.ReactNode; /** * Called once after this Snackbar finishes exiting, including after an action (e.g. Undo) * or replacement by a newer Snackbar. The action callback runs first. * Not called for Snackbars discarded before being shown, such as earlier creates batched * before the first render. */ onDismiss?: () => void; /** Requests an exit; the provider retains the surface until onExited confirms it has finished. */ onDismissRequest: () => void; /** Called after the exit animation so the provider can unmount active or show its replacement. */ onExited: () => void; /** * Controls the sentiment surface and default media. * @default 'neutral' */ sentiment?: Sentiment; /** Message content. Empty strings or absent text dismiss without creating a blank replacement. */ text: React.ReactNode; /** @deprecated Has no effect. Snackbar theming is based on ThemeProvider. */ theme?: ThemeLight | ThemeDark; /** * @deprecated Use `duration` instead. Explicit millisecond values remain supported and are not * automatically remapped when no `duration` is supplied. * To migrate, use `default` for 0–5000ms, `extended` for values above 5000ms, and `indefinite` * for intentionally persistent notifications. */ timeout?: number; /** @deprecated Has no effect when using SnackbarProvider, which manages Snackbar identity. */ timestamp?: number; /** Controls entry/exit; the surface does not manage visibility itself. */ visible: boolean; } export declare const Snackbar: ({ action, announcementKey, duration, loading, media, onDismissRequest, onExited, sentiment, text, timeout, visible, }: SnackbarProps) => import("react").JSX.Element; declare const _default: (props: SnackbarProps) => import("react").ReactPortal | null; export default _default; //# sourceMappingURL=Snackbar.d.ts.map