import type { ReactNode } from "react"; import { type IconName } from "../Icon"; import type { IconButtonProps } from "../IconButton/IconButton"; export type Colors = "error" | "warn" | "info" | "default"; export type AlertProps = { icon?: IconName; title?: string; /** * Indicates if the title is in a loading state. When true, an animated ellipsis is displayed next to the title. */ titleLoading?: boolean; subtitle?: ReactNode; rightButton?: RightButton; color?: Colors; footerButtons?: FooterButtons; noShadow?: boolean; align?: "center"; }; type RightButton = { onClick: () => void; } & ({ type: "close"; } | { type: "text"; title: string; } | { type: "text-dimmed"; title: string; }); export interface FooterButtons { /** Dismiss button in the footer, displayed first */ dismiss?: { text: string; onClick?: () => void; }; /** Main action button in the footer, displayed second */ action?: { text: string; onClick: () => void; /** Icon displayed on the right of the button, defaults to arrowForward */ icon?: IconName; }; } export declare function Alert(props: AlertProps): JSX.Element; type RightButtonProps = RightButton & { color: IconButtonProps["color"]; }; declare function RightButton(props: RightButtonProps): JSX.Element; export {};