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 { StyleSheet } from 'react-native';
const CommunityName = ({
  communityName,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  ...props
}) => {
  const elementId = ElementID.community_name;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const styles = StyleSheet.create({
    displayName: {
      color: themeStyles.colors.base,
      flexShrink: 1
    }
  });
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(Typography.Headline, _extends({
    testID: accessibilityId,
    style: styles.displayName,
    numberOfLines: 2
  }, props), communityName === null || communityName === void 0 ? void 0 : communityName.trim());
};
export default CommunityName;
//# sourceMappingURL=CommunityName.js.map