import * as React from "react";
import { type ConfigProps } from "../ConfigProvider";
type NoticeType = "info" | "success" | "error" | "warning" | "loading";
export declare const DEFAULT_DURATION = 3;
export declare function getKeyThenIncreaseKey(): number;
export interface ConfigOptions {
    top?: number;
    duration?: number;
    prefixCls?: string;
    getContainer?: () => HTMLElement;
    transitionName?: string;
    maxCount?: number;
    rtl?: boolean;
    /**
     * ConfigProvider 的配置，用于在 message 中传递 context
     */
    configProviderProps?: ConfigProps;
}
export interface ThenableArgument {
    (val: any): void;
}
export interface MessageType {
    (): void;
    then: (fill: ThenableArgument, reject: ThenableArgument) => Promise<void>;
    promise: Promise<void>;
}
export interface ArgsProps {
    content: React.ReactNode;
    duration: number | null;
    type?: NoticeType;
    prefixCls?: string;
    onClose?: () => void;
    icon?: React.ReactNode;
    key?: string | number;
    style?: React.CSSProperties;
    className?: string;
}
type ConfigContent = React.ReactNode | string;
type ConfigDuration = number | (() => void);
type JointContent = ConfigContent | ArgsProps;
export type ConfigOnClose = () => void;
export declare function attachTypeApi(originalApi: any, type: string): void;
export interface MessageInstance {
    info(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
    success(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
    error(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
    warning(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
    loading(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
    open(args: ArgsProps): MessageType;
}
export interface MessageApi extends MessageInstance {
    warn(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
    config(options: ConfigOptions): void;
    destroy(): void;
    useMessage(): [MessageInstance, React.ReactElement];
}
declare const _default: MessageApi;
export default _default;
