/// <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 } from 'rc-upload/lib/interface';
import './index.less';
interface IndexState {
    visible: boolean;
    errorFileUrl?: string;
    importStatus: 'initial' | 'uploading' | 'success' | 'fail';
    percent: number;
    delay?: number;
}
declare type ProgressData = {
    code: '200' | '201' | '400' | '500';
    data: {
        progress: number;
        nosUrl?: string;
    };
    msg: string;
};
interface IndexProps {
    title: string;
    importFn: (params?: any) => Promise<any>;
    exportFn: (params?: any) => Promise<any>;
    progressFn: (params?: any) => Promise<ProgressData>;
    params?: {
        taskId: number | string;
        [key: string]: any;
    };
    maxSize?: number;
    async?: boolean;
    forceOpen?: boolean;
    children?: (percent: number) => React.ReactNode | React.ReactNode;
    extra?: React.ReactNode;
    delay?: number;
    onSuccess?: Function;
    onError?: Function;
}
declare class FileImport extends Component<IndexProps, IndexState> {
    timer: NodeJS.Timeout;
    constructor(props: IndexProps);
    componentDidMount(): void;
    beforeUpload: (file: {
        name: any;
        size: number;
    }) => boolean;
    customRequest: (option: UploadRequestOption) => void;
    isUploading: () => void;
    getProgress: () => void;
    onOk: () => void;
    onCancel: () => void;
    render(): JSX.Element;
}
export default FileImport;
