import { ModalProps } from '../Modal'; import { ReactNode } from 'react'; import { MobileBreakpoint } from '../../../utils/customHooks'; import { LottieSegment } from '../../Lottie/LottieAnimation'; export type SuccessModalVariant = 'success' | 'progress' | 'upload'; export interface SuccessModalProps { isOpen: boolean; /** Called by the close (X) button and the Escape key. */ onClose: () => void; variant?: SuccessModalVariant; title?: ReactNode; subtitle?: ReactNode; content?: ReactNode; /** A custom Lottie animation, played instead of the `variant` one. */ animationSrc?: string; loop?: boolean; autoplay?: boolean; /** Frames to play, `[start, end]`. */ segment?: LottieSegment; speed?: number; /** Passed to the underlying `Modal`. */ modalProps?: Partial>; /** CSS max width of the box. */ maxWidth?: string; /** Skips the animation container entirely (e.g. a plain form step with no success/progress state). */ hideAnimation?: boolean; /** Below this width it is a `SideModal` (full width under 768px). Default `'Medium'` (768px). */ sideModalBreakpoint?: MobileBreakpoint; /** Stays a centred modal at every width instead of becoming a `SideModal`. */ disableSideModal?: boolean; } export declare const SuccessModalComponent: ({ isOpen, onClose, variant, title, subtitle, content, animationSrc, loop, autoplay, segment, speed, modalProps, maxWidth, hideAnimation, sideModalBreakpoint, disableSideModal, }: SuccessModalProps) => import("react/jsx-runtime").JSX.Element; export interface ShowSuccessOptions extends Omit { /** Closes the modal after this many ms; 0 keeps it open until the user closes it. */ autoClose?: number; } /** Mounts a `SuccessModal` outside the React tree; resolves once it has closed. */ export declare const showSuccess: (options?: ShowSuccessOptions) => Promise; /** `showSuccess` with the progress animation. */ export declare const showProgress: (options?: ShowSuccessOptions) => Promise; export { SuccessModalComponent as SuccessModal }; export default showSuccess;