import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-187f787e.js';
import { L as Label, b as LabelColors, a as LabelTypography } from '../../index-46d8dde5.js';
import Icon, { IconTypes, IconColors } from '../../ui/Icon.js';
import '../../stringSet-fd70cba0.js';
import '../../index-5b34a381.js';
import 'prop-types';

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 = useContext(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.createElement("div", {
    className: "sendbird-notification".concat(count < 1 ? '--hide' : '', " ").concat(className),
    onClick: onClick
  }, /*#__PURE__*/React__default.createElement(Label, {
    className: "sendbird-notification__text",
    color: LabelColors.ONCONTENT_1,
    type: LabelTypography.CAPTION_2
  }, "".concat(count, " "), stringSet.CHANNEL__MESSAGE_LIST__NOTIFICATION__NEW_MESSAGE, " ".concat(timeArray.join(' '))), /*#__PURE__*/React__default.createElement(Icon, {
    width: "24px",
    height: "24px",
    type: IconTypes.CHEVRON_DOWN,
    fillColor: IconColors.CONTENT
  }));
};

export { UnreadCount as default };
//# sourceMappingURL=UnreadCount.js.map
