"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 _Typography = require("../../../core/components/Typography/Typography");
var _reactNativeSvg = require("react-native-svg");
var _icons = require("../../../core/assets/icons");
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 CommunityPendingPost = ({
  number = 0,
  pageId = _enums.PageID.WildCardPage,
  componentId = _enums.ComponentID.WildCardComponent,
  isModerator = false,
  ...props
}) => {
  const elementId = _enums.ElementID.community_pending_post;
  const {
    isExcluded,
    accessibilityId,
    themeStyles
  } = (0, _hooks.useAmityElement)({
    pageId,
    componentId,
    elementId
  });
  const styles = _reactNative.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(_reactNative.TouchableOpacity, _extends({
    hitSlop: 0.8,
    activeOpacity: 0.7,
    testID: accessibilityId
  }, props), /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.titleContainer
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgXml, {
    xml: (0, _icons.dot)()
  }), /*#__PURE__*/React.createElement(_Typography.Typography.BodyBold, {
    style: styles.title
  }, "Pending posts")), isModerator ? /*#__PURE__*/React.createElement(_Typography.Typography.Caption, {
    style: styles.description
  }, `${number > 10 ? `10+` : number} post${number > 1 ? 's' : ''} require approval`) : /*#__PURE__*/React.createElement(_Typography.Typography.Caption, {
    style: styles.description
  }, `Your post${number > 1 ? 's are ' : ' is '}pending for review`)));
};
var _default = exports.default = CommunityPendingPost;
//# sourceMappingURL=CommunityPendingPost.js.map