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 { useStyles } from './styles';
import { useAmityElement } from '../../../../../hooks';
import { arrowRight } from '../../../../../../core/assets/icons';
import { SvgXml } from 'react-native-svg';
import { ComponentID, ElementID, PageID } from '../../../../../enums';
import { Typography } from '../../../../../../core/components/Typography/Typography';
import { TouchableOpacity, View } from 'react-native';
function Action({
  iconProps,
  description,
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  elementId = ElementID.WildCardElement,
  label,
  ...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({
    style: styles.buttonContainer,
    testID: accessibilityId
  }, props), /*#__PURE__*/React.createElement(View, {
    style: styles.labelContainer
  }, iconProps.noContainer ? /*#__PURE__*/React.createElement(SvgXml, _extends({
    width: 24,
    height: 20,
    color: theme.colors.base
  }, iconProps)) : /*#__PURE__*/React.createElement(View, {
    style: styles.iconContainer
  }, /*#__PURE__*/React.createElement(SvgXml, _extends({
    width: 24,
    height: 20,
    color: theme.colors.base
  }, iconProps))), /*#__PURE__*/React.createElement(Typography.Body, null, label ?? (config === null || config === void 0 ? void 0 : config.text))), /*#__PURE__*/React.createElement(View, {
    style: styles.labelContainer
  }, description && /*#__PURE__*/React.createElement(Typography.Body, {
    style: styles.baseShade1Text
  }, description), /*#__PURE__*/React.createElement(SvgXml, {
    width: 24,
    height: 24,
    xml: arrowRight(),
    color: theme.colors.baseShade1
  })));
}
export default Action;
//# sourceMappingURL=Action.js.map