import { CSSProperties, ExtractPropTypes, ImgHTMLAttributes, PropType } from 'vue';
import { VueNode } from '../_util/type';
import { ProgressProps } from '../progress';
import { RcFile as OriRcFile, UploadRequestOption as RcCustomRequestOptions } from '../vc-upload/interface';
export interface FileType extends OriRcFile {
    readonly lastModifiedDate: Date;
}
export type UploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed';
export interface HttpRequestHeader {
    [key: string]: string;
}
export interface UploadFile<T = any> {
    uid: string;
    size?: number;
    name: string;
    fileName?: string;
    lastModified?: number;
    lastModifiedDate?: Date;
    url?: string;
    status?: UploadFileStatus;
    percent?: number;
    thumbUrl?: string;
    crossOrigin?: ImgHTMLAttributes['crossorigin'];
    originFileObj?: FileType;
    response?: T;
    error?: any;
    linkProps?: any;
    type?: string;
    xhr?: T;
    preview?: string;
}
export interface InternalUploadFile<T = any> extends UploadFile<T> {
    originFileObj: FileType;
}
export interface ShowUploadListInterface {
    showRemoveIcon?: boolean;
    showPreviewIcon?: boolean;
    showDownloadIcon?: boolean;
}
export interface UploadChangeParam<T = UploadFile> {
    file: T;
    fileList: T[];
    event?: {
        percent: number;
    };
}
export interface UploadLocale {
    uploading?: string;
    removeFile?: string;
    downloadFile?: string;
    uploadError?: string;
    previewFile?: string;
}
export type UploadType = 'drag' | 'select';
export type UploadListType = 'text' | 'picture' | 'picture-card';
export type UploadListProgressProps = Omit<ProgressProps, 'percent' | 'type'> & {
    class?: string;
    style?: CSSProperties;
};
export type ItemRender<T = any> = (opt: {
    originNode: VueNode;
    file: UploadFile;
    fileList: Array<UploadFile<T>>;
    actions: {
        download: () => void;
        preview: () => void;
        remove: () => void;
    };
}) => VueNode;
type PreviewFileHandler = (file: FileType | Blob) => PromiseLike<string>;
type TransformFileHandler = (file: FileType) => string | Blob | FileType | PromiseLike<string | Blob | FileType>;
type BeforeUploadValueType = void | boolean | string | Blob | FileType;
declare function uploadProps<T = any>(): {
    capture: {
        type: PropType<boolean | "user" | "environment">;
        default: boolean | "user" | "environment";
    };
    type: {
        type: PropType<UploadType>;
        default: UploadType;
    };
    name: StringConstructor;
    defaultFileList: {
        type: PropType<UploadFile<T>[]>;
        default: UploadFile<T>[];
    };
    fileList: {
        type: PropType<UploadFile<T>[]>;
        default: UploadFile<T>[];
    };
    action: {
        type: PropType<string | ((file: FileType) => string) | ((file: FileType) => PromiseLike<string>)>;
        default: string | ((file: FileType) => string) | ((file: FileType) => PromiseLike<string>);
    };
    directory: {
        type: BooleanConstructor;
        default: boolean;
    };
    data: {
        type: PropType<Record<string, unknown> | ((file: UploadFile<T>) => Record<string, unknown> | Promise<Record<string, unknown>>)>;
        default: Record<string, unknown> | ((file: UploadFile<T>) => Record<string, unknown> | Promise<Record<string, unknown>>);
    };
    method: {
        type: PropType<"post" | "POST" | "PUT" | "PATCH" | "put" | "patch">;
        default: "post" | "POST" | "PUT" | "PATCH" | "put" | "patch";
    };
    headers: {
        type: PropType<HttpRequestHeader>;
        default: HttpRequestHeader;
    };
    showUploadList: {
        type: PropType<boolean | ShowUploadListInterface>;
        default: boolean | ShowUploadListInterface;
    };
    multiple: {
        type: BooleanConstructor;
        default: boolean;
    };
    accept: StringConstructor;
    beforeUpload: {
        type: PropType<(file: FileType, FileList: FileType[]) => BeforeUploadValueType | Promise<BeforeUploadValueType>>;
        default: (file: FileType, FileList: FileType[]) => BeforeUploadValueType | Promise<BeforeUploadValueType>;
    };
    onChange: {
        type: PropType<(info: UploadChangeParam<UploadFile<T>>) => void>;
        default: (info: UploadChangeParam<UploadFile<T>>) => void;
    };
    'onUpdate:fileList': {
        type: PropType<(fileList: UploadChangeParam<UploadFile<T>>["fileList"]) => void>;
        default: (fileList: UploadChangeParam<UploadFile<T>>["fileList"]) => void;
    };
    onDrop: {
        type: PropType<(event: DragEvent) => void>;
        default: (event: DragEvent) => void;
    };
    listType: {
        type: PropType<UploadListType>;
        default: UploadListType;
    };
    onPreview: {
        type: PropType<(file: UploadFile<T>) => void>;
        default: (file: UploadFile<T>) => void;
    };
    onDownload: {
        type: PropType<(file: UploadFile<T>) => void>;
        default: (file: UploadFile<T>) => void;
    };
    onReject: {
        type: PropType<(fileList: FileType[]) => void>;
        default: (fileList: FileType[]) => void;
    };
    onRemove: {
        type: PropType<(file: UploadFile<T>) => void | boolean | Promise<void | boolean>>;
        default: (file: UploadFile<T>) => void | boolean | Promise<void | boolean>;
    };
    /** @deprecated Please use `onRemove` directly */
    remove: {
        type: PropType<(file: UploadFile<T>) => void | boolean | Promise<void | boolean>>;
        default: (file: UploadFile<T>) => void | boolean | Promise<void | boolean>;
    };
    supportServerRender: {
        type: BooleanConstructor;
        default: boolean;
    };
    disabled: {
        type: BooleanConstructor;
        default: boolean;
    };
    prefixCls: StringConstructor;
    customRequest: {
        type: PropType<(options: RcCustomRequestOptions) => void>;
        default: (options: RcCustomRequestOptions) => void;
    };
    withCredentials: {
        type: BooleanConstructor;
        default: boolean;
    };
    openFileDialogOnClick: {
        type: BooleanConstructor;
        default: boolean;
    };
    locale: {
        type: PropType<UploadLocale>;
        default: UploadLocale;
    };
    id: StringConstructor;
    previewFile: {
        type: PropType<PreviewFileHandler>;
        default: PreviewFileHandler;
    };
    /** @deprecated Please use `beforeUpload` directly */
    transformFile: {
        type: PropType<TransformFileHandler>;
        default: TransformFileHandler;
    };
    iconRender: {
        type: PropType<(opt: {
            file: UploadFile<T>;
            listType?: UploadListType;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile<T>;
            listType?: UploadListType;
        }) => VueNode;
    };
    isImageUrl: {
        type: PropType<(file: UploadFile) => boolean>;
        default: (file: UploadFile) => boolean;
    };
    progress: {
        type: PropType<UploadListProgressProps>;
        default: UploadListProgressProps;
    };
    itemRender: {
        type: PropType<ItemRender<T>>;
        default: ItemRender<T>;
    };
    /** Config max count of `fileList`. Will replace current one when `maxCount` is 1 */
    maxCount: NumberConstructor;
    height: {
        type: PropType<unknown>;
        default: unknown;
    };
    removeIcon: {
        type: PropType<(opt: {
            file: UploadFile;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile;
        }) => VueNode;
    };
    downloadIcon: {
        type: PropType<(opt: {
            file: UploadFile;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile;
        }) => VueNode;
    };
    previewIcon: {
        type: PropType<(opt: {
            file: UploadFile;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile;
        }) => VueNode;
    };
};
export type UploadProps = Partial<ExtractPropTypes<ReturnType<typeof uploadProps>>>;
export interface UploadState<T = any> {
    fileList: UploadFile<T>[];
    dragState: string;
}
declare function uploadListProps<T = any>(): {
    listType: {
        type: PropType<UploadListType>;
        default: UploadListType;
    };
    onPreview: {
        type: PropType<(file: UploadFile<T>) => void>;
        default: (file: UploadFile<T>) => void;
    };
    onDownload: {
        type: PropType<(file: UploadFile<T>) => void>;
        default: (file: UploadFile<T>) => void;
    };
    onRemove: {
        type: PropType<(file: UploadFile<T>) => void | boolean>;
        default: (file: UploadFile<T>) => void | boolean;
    };
    items: {
        type: PropType<UploadFile<T>[]>;
        default: UploadFile<T>[];
    };
    progress: {
        type: PropType<UploadListProgressProps>;
        default: UploadListProgressProps;
    };
    prefixCls: {
        type: PropType<string>;
        default: string;
    };
    showRemoveIcon: {
        type: BooleanConstructor;
        default: boolean;
    };
    showDownloadIcon: {
        type: BooleanConstructor;
        default: boolean;
    };
    showPreviewIcon: {
        type: BooleanConstructor;
        default: boolean;
    };
    removeIcon: {
        type: PropType<(opt: {
            file: UploadFile;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile;
        }) => VueNode;
    };
    downloadIcon: {
        type: PropType<(opt: {
            file: UploadFile;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile;
        }) => VueNode;
    };
    previewIcon: {
        type: PropType<(opt: {
            file: UploadFile;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile;
        }) => VueNode;
    };
    locale: {
        type: PropType<UploadLocale>;
        default: UploadLocale;
    };
    previewFile: {
        type: PropType<PreviewFileHandler>;
        default: PreviewFileHandler;
    };
    iconRender: {
        type: PropType<(opt: {
            file: UploadFile<T>;
            listType?: UploadListType;
        }) => VueNode>;
        default: (opt: {
            file: UploadFile<T>;
            listType?: UploadListType;
        }) => VueNode;
    };
    isImageUrl: {
        type: PropType<(file: UploadFile) => boolean>;
        default: (file: UploadFile) => boolean;
    };
    appendAction: {
        type: PropType<() => VueNode>;
        default: () => VueNode;
    };
    appendActionVisible: {
        type: BooleanConstructor;
        default: boolean;
    };
    itemRender: {
        type: PropType<ItemRender<T>>;
        default: ItemRender<T>;
    };
};
export type UploadListProps = Partial<ExtractPropTypes<ReturnType<typeof uploadListProps>>>;
export { uploadListProps, uploadProps };
