import type { MouseEventHandler, ReactNode } from 'react';
import type { TestIdProp } from '../../types';
export type BaseToastMessage = {
    /** String to identify the specific message. Used as onDismiss callback arg. */
    id?: string;
    /** A short message to provide feedback based upon a user action. */
    content: string;
    /**
     * Time in milliseconds to automatically dismiss toast.
     * Can be set globally on Toaster and overridden individually at a message level.
     * @default Infinity
     */
    dismissAfter?: number;
    /** Called when user or timer dismisses toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */
    onDismiss?: ({ id, timeout }: {
        id: NonNullable<ToastMessage['id']>;
        timeout: boolean;
    }) => void;
};
export type CreatedMessage = Pick<BaseToastMessage, 'onDismiss'> & {
    /** String to identify the newly created record. Used as onDismiss callback arg. */
    id: string;
    /** Text of the link. */
    label: string;
    /** Link to newly created record. */
    href: string;
    /** Called when link is clicked. */
    onClick?: MouseEventHandler<HTMLAnchorElement>;
    dismissAfter?: never;
    content?: never;
};
export type ToastMessage = BaseToastMessage | CreatedMessage;
export interface ToasterProps extends TestIdProp {
    /** The element(s) responsible for handling the Toaster state. */
    children: ReactNode;
    /**
     * Time in milliseconds to automatically dismiss toast.
     * Can be set globally on Toaster and overridden individually at a message level.
     * @default Infinity
     */
    dismissAfter?: ToastMessage['dismissAfter'];
    /** Called when user or timer dismisses Toasts. Callback is passed the message id and boolean indicating if the dismissal was timed. */
    onDismiss?: ToastMessage['onDismiss'];
}
//# sourceMappingURL=Toaster.types.d.ts.map