// 部分导入成功
import React, { useContext } from 'react';
import { Divider } from 'antd';
import { ExclamationCircleFilled } from '@ant-design/icons';
import { ConfigContext } from "../config-provider/context";
import { replaceMessage } from "../locale/utils";
var PartialSuccess = function PartialSuccess(_ref) {
  var totalCount = _ref.totalCount,
    successCount = _ref.successCount,
    errorCount = _ref.errorCount,
    errorFileUrl = _ref.errorFileUrl,
    onReImport = _ref.onReImport;
  var componentContext = useContext(ConfigContext);
  var uiLocale = componentContext.uiLocale;
  return /*#__PURE__*/React.createElement("div", {
    className: "container-partial-success"
  }, /*#__PURE__*/React.createElement(ExclamationCircleFilled, null), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
    className: "title"
  }, uiLocale.FileImport.PartialSuccess.title), /*#__PURE__*/React.createElement("div", {
    className: "desc"
  }, replaceMessage(uiLocale.FileImport.PartialSuccess.totalCount, {
    totalCount: "".concat(totalCount || 0)
  }), uiLocale.FileImport.PartialSuccess.successStart, " ", /*#__PURE__*/React.createElement("span", {
    className: "f-success"
  }, successCount), " ", uiLocale.FileImport.PartialSuccess.successEnd, uiLocale.FileImport.PartialSuccess.failStart, ' ', /*#__PURE__*/React.createElement("span", {
    className: "f-error"
  }, errorCount), " ", uiLocale.FileImport.PartialSuccess.failEnd), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
    href: errorFileUrl
  }, uiLocale.FileImport.Error.download), /*#__PURE__*/React.createElement(Divider, {
    type: "vertical"
  }), /*#__PURE__*/React.createElement("a", {
    onClick: onReImport
  }, uiLocale.FileImport.repeatBtnText))));
};
export default PartialSuccess;