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

const ReactionBadge = /*#__PURE__*/React__default.forwardRef((props, ref) => {
  const {
    className = '',
    children,
    count = '',
    isAdd = false,
    selected = false,
    onClick = () => {/* noop */}
  } = props;
  const getClassNameTail = () => {
    if (selected && !isAdd) {
      return '--selected';
    }
    if (isAdd) {
      return '--is-add';
    }
    return '';
  };
  return /*#__PURE__*/React__default.createElement("div", {
    className: [...(Array.isArray(className) ? className : [className]), `sendbird-reaction-badge${getClassNameTail()}`].join(' '),
    role: "button",
    ref: ref,
    onClick: onClick,
    onKeyDown: onClick,
    onTouchEnd: onClick,
    tabIndex: 0
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-reaction-badge__inner"
  }, /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-reaction-badge__inner__icon"
  }, children), /*#__PURE__*/React__default.createElement(Label, {
    className: children && count && 'sendbird-reaction-badge__inner__count',
    type: LabelTypography.CAPTION_3,
    color: LabelColors.ONBACKGROUND_1
  }, count)));
});

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