export declare type UploadProgressType = 'real' | 'mock';
export interface UploadFile extends File {
    lastModified: number;
    name: string;
    percent?: number;
    raw?: File;
    response?: object;
    size: number;
    status?: 'success' | 'fail' | 'progress' | 'waiting';
    type: string;
    url?: string;
}
export interface RequestMethodResponse {
    status: 'success' | 'fail';
    error?: string;
    response: {
        url?: string;
        [key: string]: any;
    };
}
export interface ProgressContext {
    e?: ProgressEvent;
    file: UploadFile;
    percent: number;
    type: UploadProgressType;
}
export interface HTMLInputEvent extends Event {
    target: HTMLInputElement & EventTarget;
}
export interface InnerProgressContext {
    event?: ProgressEvent;
    file: UploadFile;
    percent: number;
    type?: ProgressContext['type'];
}
export interface SuccessContext {
    event?: ProgressEvent;
    file: UploadFile;
    response: RequestMethodResponse['response'];
}
export interface UploadRemoveOptions {
    e: MouseEvent;
    file?: UploadFile;
    index: number;
}
export interface FlowRemoveContext {
    e: MouseEvent;
    index: number;
    file: UploadFile;
}
export interface XhrOptions {
    action: string;
    withCredentials: boolean;
    headers: {
        [key: string]: string;
    };
    data: {
        [key: string]: any;
    } | Function;
    file: UploadFile;
    name: string;
    onError: ({ event, file, response }: {
        event?: ProgressEvent;
        file?: UploadFile;
        response?: any;
    }) => void;
    onSuccess: (context: SuccessContext) => void;
    onProgress: (context: InnerProgressContext) => void;
}
