"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _enums = require("../../enums");
var _hooks = require("../../hooks");
var _reactNative = require("react-native");
var _reactNativeReadMore = _interopRequireDefault(require("@fawazahmed/react-native-read-more"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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 CommunityDescription = ({
  description,
  pageId = _enums.PageID.WildCardPage,
  componentId = _enums.ComponentID.WildCardComponent,
  ...props
}) => {
  const elementId = _enums.ElementID.community_description;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const styles = _reactNative.StyleSheet.create({
    description: {
      color: themeStyles.colors.base,
      fontSize: 15,
      fontWeight: '400',
      lineHeight: 20
    },
    seeMore: {
      color: themeStyles.colors.primary,
      fontSize: 15,
      fontWeight: '400',
      lineHeight: 20
    }
  });
  if (isExcluded || !description) return null;
  return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
    testID: accessibilityId
  }, props), /*#__PURE__*/React.createElement(_reactNativeReadMore.default, {
    style: styles.description,
    numberOfLines: 4,
    seeMoreStyle: styles.seeMore,
    seeLessText: "",
    seeLessStyle: styles.seeMore
  }, description));
};
var _default = exports.default = CommunityDescription;
//# sourceMappingURL=CommunityDescription.js.map