/// <reference types="node" />
/**
 * 导入组件
 * @param {obj} params 不同业务场景下需要传入的参数
 *         @param {number} taskId 必传 任务id
 * @param {string} title 标题
 * @param {number} delay 查询导入进度接口的间隔时间 默认10s
 * @param {function} onSuccess 导入成功的回调函数
 * @param {function} onError 导入失败的回调函数
 */
import React, { Component } from 'react';
import { UploadRequestOption, UploadProps } from 'rc-upload/lib/interface';
declare type statusProps = 'initial' | 'uploading' | 'success' | 'fail';
declare type paramProps = {
    taskId: number | string;
    [key: string]: any;
};
declare type childProps = {
    percent: number;
    status: statusProps;
};
interface IndexState {
    visible: boolean;
    errorFileUrl?: string;
    importStatus: statusProps;
    percent: number;
    delay?: number;
}
declare type ProgressData = {
    code: '200' | '201' | '400' | '500';
    data: {
        progress: number;
        nosUrl?: string;
    };
    msg: string;
};
export interface FileImportProps {
    title: string;
    template?: React.ReactNode;
    importFn: (params: any) => Promise<any>;
    progressFn: (params: any) => Promise<ProgressData>;
    params?: paramProps;
    maxSize?: number;
    forceOpen?: boolean;
    children?: ((params: childProps) => React.ReactNode) | React.ReactNode;
    delay?: number;
    onSuccess?: Function;
    onError?: Function;
    customRender?: {
        initial?: (defaultNode: React.ReactNode, options: {
            setStatus: (status: statusProps) => void;
            uploadParams: UploadProps;
        }) => React.ReactNode;
        uploading?: (defaultNode: React.ReactNode, options: {
            setStatus: (status: statusProps) => void;
            percent: number;
        }) => React.ReactNode;
        success?: (defaultNode: React.ReactNode, options: {
            setStatus: (status: statusProps) => void;
        }) => React.ReactNode;
        fail?: (defaultNode: React.ReactNode, options: {
            setStatus: (status: statusProps) => void;
            errorFileUrl?: string;
        }) => React.ReactNode;
    };
}
declare class FileImport extends Component<FileImportProps, IndexState> {
    timer: NodeJS.Timeout;
    constructor(props: FileImportProps);
    componentDidMount(): void;
    beforeUpload: (file: {
        name: any;
        size: number;
    }) => boolean;
    customRequest: (option: UploadRequestOption) => void;
    isUploading: () => void;
    getProgress: () => void;
    renderDom: () => React.ReactNode;
    onOk: () => void;
    onCancel: () => void;
    render(): JSX.Element;
}
export default FileImport;
