"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = require("react");
var _Typography = require("../../../core/components/Typography/Typography");
var _enums = require("../../enums");
var _hooks = require("../../hooks");
var _number = require("../../../core/utils/number");
var _styles = require("./styles");
const CommunityMemeberCount = ({
  counts,
  pageId = _enums.PageID.WildCardPage,
  componentId = _enums.ComponentID.WildCardComponent
}) => {
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId: _enums.ElementID.community_member_count
  });
  const styles = (0, _styles.useStyles)(themeStyles);
  const memberCounts = (0, _number.formatNumber)(counts);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(_Typography.Typography.Caption, {
    style: styles.memberText,
    testID: accessibilityId
  }, memberCounts, " member", counts > 1 ? 's' : '');
};
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(CommunityMemeberCount);
//# sourceMappingURL=CommunityMemeberCount.js.map