/// <reference types="react" />
import { TableProps } from 'antd/lib/table';
import { UploadFileProps } from '../upload/interface';
declare type StatusCode = '200' | '201' | '203' | '300' | '301' | '400' | '401' | '500';
declare type setStatus = (status: Status) => void;
declare type ITableProps = TableProps<IObject>;
export declare type Status = 'initial' | 'uploading' | 'confirm' | 'progressing' | 'success' | 'partial-success' | 'error';
export interface Progress {
    status: StatusCode;
    progress: number;
    nosUrl: string;
    total: number;
    successCount: number;
    errorCount: number;
}
interface ConfirmParams {
    data?: {
        head: IObject[];
        result: IObject[];
        total: number;
    };
    tag?: {
        tagList: IObject[];
        tagFileUrl: string;
    };
    processKey: string;
    refreshTable: (params: any) => void;
}
export interface IndexProps {
    title: string | React.ReactElement;
    baseURL: string;
    open?: boolean;
    tableProps?: ITableProps;
    bucketName?: string;
    forceOpen?: boolean;
    template?: React.ReactNode;
    width?: number | Partial<{
        [key in Status]: number;
    }>;
    children?: React.ReactElement;
    delay?: number;
    notice?: React.ReactNode;
    successTip?: React.ReactNode;
    errorTip?: React.ReactNode | ((errorFileUrl?: string) => React.ReactNode);
    footer?: Partial<{
        [key in Status]: React.ReactNode;
    }>;
    importFn: (file: string) => Promise<string>;
    progressFn?: () => Promise<{
        processKey: string;
        status: StatusCode;
        progress: number;
        nosUrl: string;
    }>;
    onSuccess?: (params: {
        status: Status;
        [key: string]: any;
    }) => void;
    onError?: (params: any) => void;
    onVisibleChange?: (open: boolean) => void;
    customRender?: {
        confirm?: (defaultNode: React.ReactElement, options: ConfirmParams) => React.ReactElement;
        progressing?: (defaultNode: React.ReactElement, options: {
            percent?: number;
        }) => React.ReactElement;
        success?: (defaultNode: React.ReactElement, options: {
            setStatus: setStatus;
        }) => React.ReactElement;
        partialSuccess?: (defaultNode: React.ReactElement, options: {
            setStatus: setStatus;
            errorFileUrl: string;
            totalCount: number;
            successCount: number;
            errorCount: number;
        }) => React.ReactElement;
        error?: (defaultNode: React.ReactElement, options: {
            setStatus: setStatus;
            errorFileUrl?: string;
        }) => React.ReactElement;
        notice?: () => React.ReactElement;
    };
}
export interface InitialProps {
    template?: React.ReactNode;
    notice?: React.ReactNode;
    bucketName?: string;
    percent?: number;
    status: Status;
    onCancelUpload: () => void;
    onUpload: (file: UploadFileProps) => void;
}
export interface ConfirmProps {
    baseURL: string;
    tableProps?: ITableProps;
    processKey: string;
    setTotal: React.Dispatch<React.SetStateAction<number>>;
    renderNotice?: () => React.ReactElement;
    renderContent?: (defaultNode: React.ReactElement, options: ConfirmParams) => React.ReactElement;
}
export interface ProgressingProps {
    percent: number;
}
export interface SuccessProps {
    successTip?: React.ReactNode;
    onReImport: () => void;
}
export interface PartialSuccessProps {
    successCount: number;
    errorCount: number;
    totalCount: number;
    errorFileUrl: string;
    onReImport: () => void;
}
export interface ErrorProps {
    errorTip?: React.ReactNode;
    errorFileUrl?: string;
    onReImport: () => void;
}
export interface FileImportLocale {
    modalConfirmTitle: string;
    modalConfirmContent: string;
    noticeBtnText: string;
    confirmBtnText: string;
    repeatBtnText: string;
    finishBtnText: string;
    progressingText: string;
    Confirm: {
        sensitive: string;
        download: string;
        totalStart: string;
        totalEnd: string;
    };
    Error: {
        errorFileUrl: string;
        commonError: string;
        title: string;
        download: string;
    };
    Initial: {
        cancelText: string;
        hintText: string;
        validating: string;
        uploading: string;
    };
    PartialSuccess: {
        title: string;
        totalCount: string;
        successStart: string;
        successEnd: string;
        failStart: string;
        failEnd: string;
    };
    Success: {
        title: string;
        continueBtnText: string;
    };
}
export {};
