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 } from 'react-native';
import { SvgXml } from 'react-native-svg';
import { close } from '../../../core/assets/icons';
import { useAmityElement } from '../../hooks';
import { ComponentID, ElementID, PageID } from '../../enums';
import { useStyles } from './styles';
function CloseButton({
  pageId = PageID.WildCardPage,
  componentId = ComponentID.WildCardComponent,
  elementId = ElementID.close_button,
  iconProps,
  ...props
}) {
  const {
    themeStyles,
    isExcluded,
    accessibilityId
  } = useAmityElement({
    pageId,
    componentId,
    elementId
  });
  const {
    theme
  } = useStyles(themeStyles);
  if (isExcluded) return null;
  return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({}, props, {
    testID: accessibilityId
  }), /*#__PURE__*/React.createElement(SvgXml, _extends({
    xml: close(),
    width: "24",
    height: "24",
    color: theme.colors.base
  }, iconProps)));
}
export default CloseButton;
//# sourceMappingURL=index.js.map