import React, { memo } from 'react';
import ConfirmModal from 'components/ConfirmModal';
import EasyvProgress from 'components/EasyvProgress';

function ExportModal({ visible, title, status, statusText, percent, onCancel, onRestart }) {
  return (
    <ConfirmModal visible={visible} title={title} onCancel={onCancel}>
      <EasyvProgress
        percent={percent}
        status={status}
        title={statusText}
        statusMsg={{ exception: <i className="icon iconfont icon-btn_reload click" onClick={onRestart} title="重试" /> }}
      />
    </ConfirmModal>
  );
}

export default memo(ExportModal);
