import { memo } from 'react';
import { Typography } from '../../../core/components/Typography/Typography';
import { ComponentID, ElementID, PageID } from '../../enums';
import { useAmityElement } from '../../hooks';
import { formatNumber } from '../../../core/utils/number';
import { useStyles } from './styles';
const CommunityMemeberCount = ({
  counts,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent
}) => {
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId: ElementID.community_member_count
  });
  const styles = useStyles(themeStyles);
  const memberCounts = formatNumber(counts);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(Typography.Caption, {
    style: styles.memberText,
    testID: accessibilityId
  }, memberCounts, " member", counts > 1 ? 's' : '');
};
export default /*#__PURE__*/memo(CommunityMemeberCount);
//# sourceMappingURL=CommunityMemeberCount.js.map