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 { ComponentID, ElementID, PageID } from '../../enums';
import { useAmityElement } from '../../hooks';
import { StyleSheet } from 'react-native';
import ReadMore from '@fawazahmed/react-native-read-more';
import { View } from 'react-native';
const CommunityDescription = ({
  description,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  ...props
}) => {
  const elementId = ElementID.community_description;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const styles = 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(View, _extends({
    testID: accessibilityId
  }, props), /*#__PURE__*/React.createElement(ReadMore, {
    style: styles.description,
    numberOfLines: 4,
    seeMoreStyle: styles.seeMore,
    seeLessText: "",
    seeLessStyle: styles.seeMore
  }, description));
};
export default CommunityDescription;
//# sourceMappingURL=CommunityDescription.js.map