"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CommunityCategory = CommunityCategory;
var _reactNative = require("react-native");
var _styles = require("./styles");
var _hooks = require("../../../../hooks");
var _enums = require("../../../../enums");
function CommunityCategory({
  categoryName,
  style,
  maxWidth,
  pageId,
  componentId
}) {
  const {
    styles
  } = (0, _styles.useStyles)();
  const {
    accessibilityId,
    isExcluded
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId: _enums.ElementID.community_category
  });
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    testID: accessibilityId,
    style: [styles.chipContainer, maxWidth ? {
      maxWidth: maxWidth
    } : null, style]
  }, /*#__PURE__*/React.createElement(_reactNative.Text, {
    style: styles.chipText,
    numberOfLines: 1
  }, categoryName));
}
//# sourceMappingURL=CommunityCategory.js.map