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, TouchableOpacity } from 'react-native';
import { View } from 'react-native';
import { Typography } from '../../../core/components/Typography/Typography';
import { SvgXml } from 'react-native-svg';
import { dot } from '../../../core/assets/icons';
const CommunityPendingPost = ({
  number = 0,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  isModerator = false,
  ...props
}) => {
  const elementId = ElementID.community_pending_post;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const styles = StyleSheet.create({
    container: {
      flexDirection: 'column',
      alignItems: 'center',
      padding: 12,
      borderRadius: 8,
      backgroundColor: themeStyles.colors.backgroundShade1
    },
    titleContainer: {
      flexDirection: 'row',
      alignItems: 'center',
      gap: 7
    },
    title: {
      color: themeStyles.colors.base
    },
    description: {
      color: themeStyles.colors.baseShade2
    }
  });
  if (isExcluded || number === 0) return null;
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
    hitSlop: 0.8,
    activeOpacity: 0.7,
    testID: accessibilityId
  }, props), /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(View, {
    style: styles.titleContainer
  }, /*#__PURE__*/React.createElement(SvgXml, {
    xml: dot()
  }), /*#__PURE__*/React.createElement(Typography.BodyBold, {
    style: styles.title
  }, "Pending posts")), isModerator ? /*#__PURE__*/React.createElement(Typography.Caption, {
    style: styles.description
  }, `${number > 10 ? `10+` : number} post${number > 1 ? 's' : ''} require approval`) : /*#__PURE__*/React.createElement(Typography.Caption, {
    style: styles.description
  }, `Your post${number > 1 ? 's are ' : ' is '}pending for review`)));
};
export default CommunityPendingPost;
//# sourceMappingURL=CommunityPendingPost.js.map