function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import { Typography } from '../../../core/components/Typography/Typography';
import { ComponentID, ElementID, PageID } from '../../enums';
import { useAmityElement } from '../../hooks';
import { useStyles } from './styles';
const CommunityDisplayname = ({
  communityName,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  ...props
}) => {
  const elementId = ElementID.community_display_name;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const styles = useStyles(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(Typography.TitleBold, _extends({
    testID: accessibilityId,
    style: styles.displayName,
    numberOfLines: 1
  }, props), communityName === null || communityName === void 0 ? void 0 : communityName.trim());
};
export default CommunityDisplayname;
//# sourceMappingURL=CommunityDisplayname.js.map