"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _lodash = require("lodash");
var _useSettings2 = _interopRequireDefault(require("../vm-hooks/useSettings"));
var _vmSubTitle = _interopRequireDefault(require("../vm-sub-title"));
var _count = _interopRequireDefault(require("./imgs/count.png"));
var _amount = _interopRequireDefault(require("./imgs/amount.png"));
var _count_light = _interopRequireDefault(require("./imgs/count_light.png"));
var _amount_light = _interopRequireDefault(require("./imgs/amount_light.png"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
 * 维保信息汇总
 */

var RmInfoSummary = function RmInfoSummary(props) {
  var data = props.data;
  var _useSettings = (0, _useSettings2["default"])(),
    theme = _useSettings.theme;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-head"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u7EF4\u4FDD\u4FE1\u606F\u6C47\u603B"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item"
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: theme === 'dark' ? _count["default"] : _count_light["default"]
  }), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item--name"
  }, "\u5E74\u5EA6\u7EF4\u4FDD\u603B\u6B21\u6570"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item--value"
  }, /*#__PURE__*/_react["default"].createElement("span", null, (data === null || data === void 0 ? void 0 : data.thisYearCount) || 0), ' 次', /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item--value-compare"
  }, "\u5E74\u540C\u6BD4", (0, _lodash.isNull)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearCount) || (0, _lodash.isUndefined)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearCount) ? ' --' : "".concat(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearCount, "%"), (data === null || data === void 0 ? void 0 : data.thisYearOnLastYearCount) >= 100 ? (/*#__PURE__*/_react["default"].createElement("div", {
    className: "triangle-up"
  })) : !((0, _lodash.isNull)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearCount) || (0, _lodash.isUndefined)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearCount)) && /*#__PURE__*/_react["default"].createElement("div", {
    className: "triangle-down"
  }))))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item"
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: theme === 'dark' ? _amount["default"] : _amount_light["default"]
  }), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item--name"
  }, "\u5E74\u5EA6\u7EF4\u4FDD\u603B\u91D1\u989D"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item--value"
  }, /*#__PURE__*/_react["default"].createElement("span", null, (data === null || data === void 0 ? void 0 : data.thisYearFee) || 0), ' 元', /*#__PURE__*/_react["default"].createElement("div", {
    className: "rm-summary-item--value-compare"
  }, "\u5E74\u540C\u6BD4", (0, _lodash.isNull)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearFee) || (0, _lodash.isUndefined)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearFee) ? ' --' : "".concat(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearFee, "%"), (data === null || data === void 0 ? void 0 : data.thisYearOnLastYearFee) >= 100 ? (/*#__PURE__*/_react["default"].createElement("div", {
    className: "triangle-up"
  })) : !((0, _lodash.isNull)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearFee) || (0, _lodash.isUndefined)(data === null || data === void 0 ? void 0 : data.thisYearOnLastYearFee)) && /*#__PURE__*/_react["default"].createElement("div", {
    className: "triangle-down"
  })))))));
};
var _default = exports["default"] = RmInfoSummary;
//# sourceMappingURL=RmInfoSummary.js.map
