"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _Typography = require("../../../core/components/Typography/Typography");
var _enums = require("../../enums");
var _hooks = require("../../hooks");
var _reactNative = require("react-native");
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); }
const CommunityName = ({
  communityName,
  pageId = _enums.PageID.WildCardPage,
  componentId = _enums.ComponentID.WildCardComponent,
  ...props
}) => {
  const elementId = _enums.ElementID.community_name;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const styles = _reactNative.StyleSheet.create({
    displayName: {
      color: themeStyles.colors.base,
      flexShrink: 1
    }
  });
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(_Typography.Typography.Headline, _extends({
    testID: accessibilityId,
    style: styles.displayName,
    numberOfLines: 2
  }, props), communityName === null || communityName === void 0 ? void 0 : communityName.trim());
};
var _default = exports.default = CommunityName;
//# sourceMappingURL=CommunityName.js.map