import { Component } from 'react';
import { WrappedComponentProps } from 'react-intl';
import { Size } from '../common';
import { PostDataFetcher, PostDataHTTPOptions } from './utils/postData/postData';
export declare const MAX_SIZE_DEFAULT = 5000000;
export declare enum UploadStep {
    UPLOAD_IMAGE_STEP = "uploadImageStep"
}
export interface UploadProps extends WrappedComponentProps {
    animationDelay?: number;
    csButtonText?: string;
    csFailureText?: string;
    csSuccessText?: string;
    csTooLargeMessage?: string;
    csWrongTypeMessage?: string;
    httpOptions?: PostDataHTTPOptions & {
        fileInputName?: string;
        data?: Record<string, string | Blob>;
    };
    /**
     * You can provide a fetcher function with the same interface as the global fetch function, which is used by default.
     * `function fetcher(input: RequestInfo, init?: RequestInit): Promise<Response>`
     */
    fetcher?: PostDataFetcher;
    /**
     * Filesize expressed in B.<br />If set to `null`, no size limit will be applied.
     * @default 5000000 (5 MB)
     */
    maxSize?: number | null;
    psButtonText?: string;
    psButtonDisabled?: boolean;
    psProcessingText?: string;
    size?: `${Size.SMALL | Size.MEDIUM | Size.LARGE}`;
    /**
     * You can provide multiple rules separated by comma, e.g.: "application/pdf,image/*".
     * Using "*" will allow every file type to be uploaded.
     */
    usAccept?: string;
    usButtonText?: string;
    usButtonRetryText?: string;
    usDisabled?: boolean;
    usDropMessage?: string;
    usHelpImage?: React.ReactNode;
    usLabel?: string;
    usPlaceholder?: string;
    /**
     * Override for the [InlinePrompt icon's default, accessible name](/?path=/docs/other-statusicon-accessibility--docs)
     * announced by the screen readers
     * */
    errorIconLabel?: string;
    /** @deprecated Only a single variant exists, please remove this prop. */
    uploadStep?: `${UploadStep}`;
    onCancel?: () => void;
    onFailure?: (error: unknown) => void;
    onStart?: (file: File) => void;
    onSuccess?: (response: string | Response, fileName: string) => void;
}
interface UploadState {
    fileName: string;
    isDroppable: boolean;
    isComplete: boolean;
    isError: boolean;
    isImage: boolean;
    isProcessing: boolean;
    isSuccess: boolean;
    response: unknown;
    uploadedImage: string | undefined;
}
export declare class Upload extends Component<UploadProps, UploadState> {
    props: UploadProps & Required<Pick<UploadProps, keyof typeof Upload.defaultProps>>;
    static defaultProps: {
        animationDelay: number;
        maxSize: number;
        psButtonDisabled: false;
        size: "md";
        usAccept: string;
        usDisabled: false;
        usLabel: string;
    };
    dragCounter: number;
    timeouts: number;
    constructor(props: UploadProps);
    getErrorMessage(status?: number): string;
    onDragLeave(event: React.DragEvent<HTMLDivElement>): void;
    onDragEnter(event: React.DragEvent<HTMLDivElement>): void;
    onDrop(event: React.DragEvent<HTMLDivElement>): Promise<void>;
    asyncPost: (file: File) => Promise<Response>;
    handleUploadComplete: (type: "success" | "error", response: unknown) => void;
    asyncResponse: (response: unknown, type: "success" | "error") => void;
    handleOnClear: React.MouseEventHandler<HTMLButtonElement>;
    reset: () => void;
    showDataImage: (dataUrl: string) => void;
    fileDropped: (file: File) => Promise<boolean>;
    render(): import("react").JSX.Element;
}
declare const _default: import("react").FC<import("react-intl").WithIntlProps<UploadProps>> & {
    WrappedComponent: import("react").ComponentType<UploadProps>;
};
export default _default;
//# sourceMappingURL=Upload.d.ts.map