"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _vmSubTitle = _interopRequireDefault(require("../../../vm-sub-title"));
var _api = require("../../api");
require("./index.less");
var _warn = _interopRequireDefault(require("../../imgs/warn.png"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
 * 维保信息
 */

var Maintenance = function Maintenance(props) {
  var id = props.id;
  var _MaintenanceService$u = _api.MaintenanceService.useMaintenance(id),
    maintenanceRes = _MaintenanceService$u.maintenanceRes;
  var commercialInsurance = maintenanceRes.commercialInsurance,
    compulsoryInsurance = maintenanceRes.compulsoryInsurance,
    maintainDetail = maintenanceRes.maintainDetail;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u5F3A\u5236\u9669"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-wrap"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u6295\u4FDD\u65E5\u671F:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (compulsoryInsurance === null || compulsoryInsurance === void 0 ? void 0 : compulsoryInsurance.insureDate) || '-')), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u6295\u4FDD\u91D1\u989D(\u5143):"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (compulsoryInsurance === null || compulsoryInsurance === void 0 ? void 0 : compulsoryInsurance.price) || 0)), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5230\u671F\u65E5\u671F:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (compulsoryInsurance === null || compulsoryInsurance === void 0 ? void 0 : compulsoryInsurance.dueDate) || '-')), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5269\u4F59\u5929\u6570:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (compulsoryInsurance === null || compulsoryInsurance === void 0 ? void 0 : compulsoryInsurance.remainDays) || 0), (compulsoryInsurance === null || compulsoryInsurance === void 0 ? void 0 : compulsoryInsurance.remainDays) < 0 && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-warn"
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: _warn["default"]
  }), "\u5DF2\u8D85\u671F", compulsoryInsurance.remainDays, "\u5929, \u8BF7\u53CA\u65F6\u7EED\u8D39"))))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u5546\u4E1A\u9669"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-wrap"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u6295\u4FDD\u65E5\u671F:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (commercialInsurance === null || commercialInsurance === void 0 ? void 0 : commercialInsurance.insureDate) || '-')), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u6295\u4FDD\u91D1\u989D(\u5143):"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (commercialInsurance === null || commercialInsurance === void 0 ? void 0 : commercialInsurance.price) || 0)), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5230\u671F\u65E5\u671F:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (commercialInsurance === null || commercialInsurance === void 0 ? void 0 : commercialInsurance.dueDate) || '-')), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5269\u4F59\u5929\u6570:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (commercialInsurance === null || commercialInsurance === void 0 ? void 0 : commercialInsurance.remainDays) || 0), (commercialInsurance === null || commercialInsurance === void 0 ? void 0 : commercialInsurance.remainDays) < 0 && (/*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-warn"
  }, /*#__PURE__*/_react["default"].createElement("img", {
    src: _warn["default"]
  }), "\u5DF2\u8D85\u671F", commercialInsurance.remainDays, "\u5929, \u8BF7\u53CA\u65F6\u7EED\u8D39"))))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u7EF4\u4FDD\u8BB0\u5F55"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-wrap"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5E74\u5EA6\u7D2F\u8BA1\u7EF4\u4FDD\u6B21\u6570:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (maintainDetail === null || maintainDetail === void 0 ? void 0 : maintainDetail.yearMaintainCount) || 0)), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u6700\u8FD1\u4E00\u6B21\u7EF4\u4FDD\u65F6\u95F4:"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (maintainDetail === null || maintainDetail === void 0 ? void 0 : maintainDetail.lastTime) || '-')), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5E74\u5EA6\u7EF4\u4FDD\u9884\u7B97(\u5143):"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (maintainDetail === null || maintainDetail === void 0 ? void 0 : maintainDetail.yearMaintainBudget) || 0)), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5E74\u5EA6\u7D2F\u8BA1\u7EF4\u4FDD\u91D1\u989D(\u5143):"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (maintainDetail === null || maintainDetail === void 0 ? void 0 : maintainDetail.yearMaintainPrice) || 0)), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-label"
  }, "\u5269\u4F59\u9884\u7B97(\u5143):"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "car-maintenance-main-item-value"
  }, (maintainDetail === null || maintainDetail === void 0 ? void 0 : maintainDetail.surplusBudget) || 0)))));
};
var _default = exports["default"] = Maintenance;
//# sourceMappingURL=index.js.map
