"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _antd = require("antd");
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var FactoryStatistics = function FactoryStatistics(_ref) {
  var data = _ref.data;
  var list = [{
    label: '进厂车次',
    value: (data === null || data === void 0 ? void 0 : data.count) || 0,
    unit: '次'
  }, {
    label: '进厂量',
    value: (data === null || data === void 0 ? void 0 : data.netWeightTotal) > 10000 ? ((data.netWeightTotal || 0) / 1000).toFixed(2) : data === null || data === void 0 ? void 0 : data.netWeightTotal,
    unit: (data === null || data === void 0 ? void 0 : data.netWeightTotal) ? '吨' : 'kg'
  }];
  return /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    justify: 'space-around'
  }, list.map(function (item) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: item.label,
      className: "vtx-cc-unit-statistics"
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "vtx-cc-unit-statistics__label"
    }, item.label), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", {
      className: "vtx-cc-unit-statistics__value"
    }, item.value), /*#__PURE__*/_react["default"].createElement("span", {
      className: "vtx-cc-unit-statistics__unit"
    }, item.unit)));
  }));
};
var _default = exports["default"] = FactoryStatistics;
//# sourceMappingURL=FactoryStatistics.js.map
