type Position = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
type ToasterType = {
    theme?: 'dark' | 'light';
    expand?: boolean;
    visibleToasts?: number;
    offset?: number;
    mobileOffset?: number;
    gap?: number;
    dir?: 'rtl' | 'ltr';
    toastOptions?: ToastOptionsType;
};
type ToastOptionsType = {
    position?: Position;
    closeButton?: boolean;
    richColors?: boolean;
    duration?: number;
    invert?: boolean;
    onDismiss?: (toast?: ToastType) => void;
    onAutoClose?: (toast?: ToastType) => void;
};
type ToastContentType = {
    id?: number | string;
    title: string;
    description?: string;
    type?: 'success' | 'error' | 'info' | 'warning' | 'loading';
    action?: {
        label: string;
        onClick: (event: MouseEvent) => void;
        cancel?: boolean;
    };
};
type ToastType = ToastContentType & ToastOptionsType;
type PromiseT<Data = any> = Promise<Data> | (() => Promise<Data>);
type ExternalToast = Omit<ToastType, 'type' | 'title'>;
interface PromiseIExtendedResult extends ExternalToast {
    message: string;
}
type PromiseTExtendedResult<Data = any> = PromiseIExtendedResult | ((data: Data) => PromiseIExtendedResult | Promise<PromiseIExtendedResult>);
type PromiseTResult<Data = any> = string | ((data: Data) => string | Promise<string>);
type PromiseExternalToast = Omit<ExternalToast, 'description'>;
type PromiseData<ToastData = any> = PromiseExternalToast & {
    loading?: string;
    success?: PromiseTResult<ToastData> | PromiseTExtendedResult<ToastData>;
    error?: PromiseTResult | PromiseTExtendedResult;
    description?: PromiseTResult;
    finally?: () => void | Promise<void>;
};

declare function setConfig(userConfig: ToasterType): void;

declare function dismissToast(id?: ToastType['id'], exitTime?: number): void;

declare const toast: {
    (message: string, options?: Omit<ExternalToast, "richColors">): string | number;
    message(message: string, options?: Omit<ExternalToast, "richColors">): string | number;
    success(message: string, options?: ExternalToast): string | number;
    error(message: string, options?: ExternalToast): string | number;
    info(message: string, options?: ExternalToast): string | number;
    warning(message: string, options?: ExternalToast): string | number;
    loading(message: string, options?: ExternalToast): string | number;
    dismiss: typeof dismissToast;
    promise: <ToastData>(promise: PromiseT<ToastData>, data?: PromiseData<ToastData>) => void;
    config: typeof setConfig;
};

export { toast as default };
