import React__default, { useContext } from 'react';
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-4105bc4d.js';
import { a as LocalizationContext } from '../LocalizationContext-426f3d58.js';
import 'prop-types';
import '../stringSet-a62108b2.js';
import '../index-90420b99.js';

function Badge(_ref) {
  let {
    count,
    maxLevel = 2,
    className = ''
  } = _ref;
  const {
    stringSet
  } = useContext(LocalizationContext);
  const maximumNumber = parseInt('9'.repeat(maxLevel > 6 ? 6 : maxLevel), 10);
  return /*#__PURE__*/React__default.createElement("div", {
    className: [...(Array.isArray(className) ? className : [className]), 'sendbird-badge'].join(' ')
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-badge__text"
  }, /*#__PURE__*/React__default.createElement(Label, {
    type: LabelTypography.CAPTION_2,
    color: LabelColors.ONCONTENT_1
  }, count > maximumNumber ? `${maximumNumber}${stringSet.BADGE__OVER}` : count)));
}

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