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 { SvgXml } from 'react-native-svg';
import { plus } from '../../../core/assets/icons';
import { TouchableOpacity, View } from 'react-native';
import { Typography } from '../../../core/components/Typography/Typography';
import { useStyles } from './styles';
import { ComponentID, ElementID, PageID } from '../../enums';
import { useAmityElement } from '../../hooks';
function CommunityAddMemberButton({
  style,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  elementId = ElementID.community_add_member_button,
  ...props
}) {
  const {
    themeStyles,
    isExcluded,
    accessibilityId,
    config
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const {
    styles
  } = useStyles(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, props, {
    testID: accessibilityId,
    style: [styles.addButton, style]
  }), /*#__PURE__*/React.createElement(View, {
    style: styles.addButtonIconContainer
  }, /*#__PURE__*/React.createElement(SvgXml, {
    width: 24,
    height: 24,
    xml: plus(),
    color: themeStyles.colors.base
  })), /*#__PURE__*/React.createElement(Typography.Caption, {
    style: styles.addButtonLabel
  }, config === null || config === void 0 ? void 0 : config.text));
}
export default CommunityAddMemberButton;
//# sourceMappingURL=CommunityAddMemberButton.js.map