import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-1701e5c8.js';
import { L as Label, b as LabelColors, a as LabelTypography } from '../../index-f50d7ab0.js';
import Icon, { IconTypes, IconColors } from '../../ui/Icon.js';
import '../../stringSet-e9bb0333.js';
import '../../index-ff8f2f61.js';
import 'prop-types';

const UnreadCount = _ref => {
  var _time$toString, _time$toString$call;
  let {
    className = '',
    count = 0,
    time = '',
    onClick
  } = _ref;
  const {
    stringSet
  } = useContext(LocalizationContext);
  const timeArray = (time === null || time === void 0 ? void 0 : (_time$toString = time.toString) === null || _time$toString === void 0 ? void 0 : (_time$toString$call = _time$toString.call(time)) === null || _time$toString$call === void 0 ? void 0 : _time$toString$call.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${count < 1 ? '--hide' : ''} ${className}`,
    onClick: onClick
  }, /*#__PURE__*/React__default.createElement(Label, {
    className: "sendbird-notification__text",
    color: LabelColors.ONCONTENT_1,
    type: LabelTypography.CAPTION_2
  }, `${count} `, stringSet.CHANNEL__MESSAGE_LIST__NOTIFICATION__NEW_MESSAGE, ` ${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
