"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 _styles = require("./styles");
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 CommunityDisplayname = ({
  communityName,
  pageId = _enums.PageID.WildCardPage,
  componentId = _enums.ComponentID.WildCardComponent,
  ...props
}) => {
  const elementId = _enums.ElementID.community_display_name;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const styles = (0, _styles.useStyles)(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(_Typography.Typography.TitleBold, _extends({
    testID: accessibilityId,
    style: styles.displayName,
    numberOfLines: 1
  }, props), communityName === null || communityName === void 0 ? void 0 : communityName.trim());
};
var _default = exports.default = CommunityDisplayname;
//# sourceMappingURL=CommunityDisplayname.js.map