"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _getLocale = require("../../../../../../utils/getLocale");

var _dateTestChange = require("../../../../../../utils/date-test-change");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function UpdateTime(_ref) {
  var updateTime = _ref.updateTime;
  var dayDiff = updateTime && (0, _dateTestChange.testDateDiff)(updateTime);
  return /*#__PURE__*/_react["default"].createElement("div", {
    style: {
      color: dayDiff > 4 ? "#f05e5e" : "#3F4755"
    }
  }, updateTime && updateTime.length ? dayDiff > 30 ? (0, _dateTestChange.judgeTimeSpaceFromNow)(updateTime) : dayDiff === 0 ? (0, _getLocale.getLocale)("Mod_Justupdated") : "".concat(dayDiff).concat((0, _getLocale.getLocale)("Mod_dayago")) : "—");
}

var _default = UpdateTime;
exports["default"] = _default;