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