'use strict';

var React = require('react');
var LocalizationContext = require('../../LocalizationContext-1f669b3c.js');
var ui_Label = require('../../index-1b11bb85.js');
var ui_Icon = require('../../ui/Icon.js');
require('../../stringSet-ddd351f0.js');
require('../../index-f5502150.js');
require('prop-types');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var UnreadCount = function (_a) {
  var _b, _c;

  var _d = _a.className,
      className = _d === void 0 ? '' : _d,
      count = _a.count,
      _e = _a.time,
      time = _e === void 0 ? '' : _e,
      onClick = _a.onClick;
  var stringSet = React.useContext(LocalizationContext.LocalizationContext).stringSet;
  var timeArray = ((_c = (_b = time === null || time === void 0 ? void 0 : time.toString) === null || _b === void 0 ? void 0 : _b.call(time)) === null || _c === void 0 ? void 0 : _c.split(' ')) || [];
  timeArray === null || timeArray === void 0 ? void 0 : timeArray.splice(-2, 0, stringSet.CHANNEL__MESSAGE_LIST__NOTIFICATION__ON);
  return /*#__PURE__*/React__default["default"].createElement("div", {
    className: "sendbird-notification".concat(count < 1 ? '--hide' : '', " ").concat(className),
    onClick: onClick
  }, /*#__PURE__*/React__default["default"].createElement(ui_Label.Label, {
    className: "sendbird-notification__text",
    color: ui_Label.LabelColors.ONCONTENT_1,
    type: ui_Label.LabelTypography.CAPTION_2
  }, "".concat(count, " "), stringSet.CHANNEL__MESSAGE_LIST__NOTIFICATION__NEW_MESSAGE, " ".concat(timeArray.join(' '))), /*#__PURE__*/React__default["default"].createElement(ui_Icon["default"], {
    width: "24px",
    height: "24px",
    type: ui_Icon.IconTypes.CHEVRON_DOWN,
    fillColor: ui_Icon.IconColors.CONTENT
  }));
};

module.exports = UnreadCount;
//# sourceMappingURL=UnreadCount.js.map
