import { CdsProgress } from '../CdsProgress';
import { ComponentProps } from '../../utils';
import { ImgHTMLAttributes, VNode } from 'vue';
export declare namespace NUploader {
    type TBeforeUploadFileType = File | Blob | boolean | string;
    type TAction = string | ((file: IRcFile) => string | PromiseLike<string>);
    type TUploadRequestMethod = 'POST' | 'PUT' | 'PATCH' | 'post' | 'put' | 'patch';
    type TUploadRequestHeaders = Record<string, string>;
    type TUploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed';
    type TUploadListType = 'text' | 'picture' | 'picture-card';
    type TPreviewFileHandler = (file: IFileType | Blob) => PromiseLike<string>;
    type TUploadListProgressProps = ComponentProps<typeof CdsProgress>;
    type TItemRender<T = any> = (options: {
        originNode: VNode;
        file?: IUploadFile<T>;
        fileList?: IUploadFile<T>[];
        actions: {
            download?: () => void;
            preview?: () => void;
            remove?: () => void;
        };
    }) => VNode;
    interface IRcFile extends File {
        uid: string;
    }
    interface IUploadRequestError extends Error {
        status?: number;
        method?: TUploadRequestMethod;
        url?: string;
    }
    interface IUploadProgressEvent extends Partial<ProgressEvent> {
        percent?: number;
    }
    interface IUploadRequestOption<T = any> {
        data?: Record<string, unknown> | null;
        filename?: string;
        file: Exclude<TBeforeUploadFileType, File | boolean> | IRcFile | null;
        withCredentials?: boolean;
        action?: string | null;
        headers?: TUploadRequestHeaders;
        method?: TUploadRequestMethod;
        onProgress?: (event: IUploadProgressEvent) => void;
        onError?: (event: IUploadRequestError | ProgressEvent, body?: T) => void;
        onSuccess?: (body: T, xhr?: XMLHttpRequest) => void;
    }
    interface IFileType extends IRcFile {
        readonly lastModifiedDate: Date;
    }
    interface IParsedFile {
        origin: IRcFile;
        action?: string | null;
        data?: Record<string, unknown> | null;
        parsedFile: IRcFile | null;
    }
    interface IUploadFile<T = any> {
        uid: string;
        size?: number;
        name: string;
        fileName?: string;
        lastModified?: number;
        lastModifiedDate?: Date;
        url?: string;
        status?: TUploadFileStatus;
        percent?: number;
        thumbUrl?: string;
        crossOrigin?: ImgHTMLAttributes['crossorigin'];
        originFileObj?: File;
        response?: T;
        error?: any;
        linkProps?: any;
        type?: string;
        xhr?: T;
        preview?: string;
    }
    interface IInternalUploadFile<T = any> extends IUploadFile<T> {
        originFileObj: IFileType;
    }
    interface IUploadChangeParam<T = IUploadFile> {
        file: T;
        fileList: T[];
        event?: {
            percent: number;
        };
    }
    interface TShowUploadList {
        showRemoveIcon?: boolean;
        showPreviewIcon?: boolean;
        showDownloadIcon?: boolean;
    }
    interface ILocale {
        uploading?: string;
        uploadFile?: string;
        downloadFile?: string;
        removeFile?: string;
        uploadError?: string;
        previewFile?: string;
    }
}
