import { type ReactNode } from "react"; import { type IconName } from "../Icon"; interface ToastAction { title: string; onClick: () => void; icon?: IconName; } interface ToastCancel { onClick?: () => void; } interface InlineToastProps { variant?: "inline"; icon?: IconName; loadingIndicator?: boolean; } interface CardToastProps { variant: "card"; subtitle?: ReactNode; } export type ToastProps = { anchor: ReactNode; open: boolean; title: ReactNode; seconds?: number; action?: ToastAction; cancel?: ToastCancel; onOpenChange?: (open: boolean) => void; } & (InlineToastProps | CardToastProps); /** * We don't use the radix ui toast because of a bug with the timeout. * Also, in general, there are lots of issues around radix's Toast in their bug tracker and they don't fix much. * Example: https://github.com/radix-ui/primitives/pull/2236 * It also doesn't help at all when it comes to providing an imperative API: https://github.com/radix-ui/primitives/issues/2804 * They also never finished implementing it: https://github.com/radix-ui/primitives/issues/1171 */ export declare function Toast(props: ToastProps): JSX.Element; export {};