"use strict";

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

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

var _classnames = _interopRequireDefault(require("classnames"));

var _conditionRender = _interopRequireDefault(require("../../../../../condition-render"));

require("./index.css");

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

var prefixCls = "titaui-user-message-msg";

function TabTitle(props) {
  var title = props.title,
      tab = props.tab,
      data = props.data;
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(prefixCls, "__tabs-").concat(tab))
  }, title, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
    condition: data !== 0
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: (0, _classnames["default"])("".concat(prefixCls, "__tabs-total"))
  }, data >= 100 ? "99+" : data))));
}

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