import { ExtractPropTypes } from 'vue';
import uploadProps from './props';
export declare const CLASS_PREFIX = "upload";
export declare const enum EThemes {
    BUTTON = "button",
    DRAGGABLE = "draggable",
    PICTURE = "picture"
}
export type Theme = Lowercase<keyof typeof EThemes>;
export declare const enum ETypes {
    BINARY = "binary",
    FORMDATA = "formdata"
}
export type Type = Lowercase<keyof typeof ETypes>;
export declare const enum EUploadStatus {
    FAIL = "fail",
    NEW = "new",
    SUCCESS = "success",
    UPLOADING = "uploading"
}
export type UploadStatus = Lowercase<keyof typeof EUploadStatus>;
export type FormDataAttr = {
    name: string;
    value: [Blob | string, string] | Blob | string;
};
export type HeaderDataAttr = {
    name: string;
    value: string;
};
export type ExtraFormData = Record<string, [Blob | string, string] | Blob | string>;
export type UploadFiles = UploadFile[];
export type UploadFile = {
    name: string;
    status: UploadStatus;
    statusText?: string;
    percentage?: number;
    response?: unknown;
    size: number;
    uid: number;
    url?: string;
    raw: UploadRawFile;
    isPic?: boolean;
};
export interface UploadRawFile extends File {
    uid: number;
}
export type MaxSize = {
    maxFileSize: number;
    maxImgSize: number;
};
export interface UploadProgressEvent extends ProgressEvent {
    percent: number;
}
export interface APIResponse {
    code: number;
    data: any;
    message?: string;
}
export type SuccessResponse = APIResponse | XMLHttpRequestResponseType | unknown;
export type UploadProps = ExtractPropTypes<typeof uploadProps>;
export interface UploadRequestOptions {
    action: string;
    method: string;
    type: Type;
    data?: ExtraFormData | ExtraFormData[];
    formDataAttributes?: FormDataAttr | FormDataAttr[];
    filename: string;
    file: File;
    headers?: Headers | Record<string, null | number | string | undefined>;
    header?: HeaderDataAttr | HeaderDataAttr[];
    withCredentials: boolean;
    sliceUrl: string;
    mergeUrl: string;
    chunkSize: number;
    onProgress: (event: UploadProgressEvent, i?: number) => void;
    onError: (error: Error) => void;
    onSuccess: (res: SuccessResponse) => void;
    onComplete: () => void;
}
export type UploadRequestHandler = (options: UploadRequestOptions) => Promise<unknown> | XMLHttpRequest;
export type HookHandler = (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
export interface UploadHanderHooks {
    onRemove: HookHandler;
}
