"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _api = require("../../api");
var _antd = require("antd");
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var CollectStatistics = function CollectStatistics(_ref) {
  var id = _ref.id,
    startTime = _ref.startTime,
    endTime = _ref.endTime,
    garbageType = _ref.garbageType;
  var data = _api.BasicService.statistics({
    id: id,
    startTime: startTime,
    endTime: endTime,
    garbageType: garbageType
  });
  var list = garbageType === 'fqyz' ? [{
    label: '煎炸油收运桶数',
    value: (data === null || data === void 0 ? void 0 : data.jzyTrashCount) || 0,
    unit: '桶'
  }, {
    label: '煎炸油收运预估量',
    value: (data === null || data === void 0 ? void 0 : data.jzyWeight) || 0,
    unit: '吨'
  }, {
    label: '其他废弃油脂收运桶数',
    value: (data === null || data === void 0 ? void 0 : data.qtfqyTrashCount) || 0,
    unit: '桶'
  }, {
    label: '其他废弃油脂预估量',
    value: (data === null || data === void 0 ? void 0 : data.qtfqyWeight) || 0,
    unit: '吨'
  }] : [{
    label: '收运桶数',
    value: (data === null || data === void 0 ? void 0 : data.trashNums) || 0,
    unit: '桶'
  }, {
    label: '收运预估量',
    value: (data === null || data === void 0 ? void 0 : data.ygNetWeight) || 0,
    unit: '吨'
  }, {
    label: '进厂量',
    value: (((data === null || data === void 0 ? void 0 : data.netWeightTotal) || 0) / 1000).toFixed(2),
    unit: '吨'
  }];
  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"] = CollectStatistics;
//# sourceMappingURL=CollectStatistics.js.map
