import { memo } from 'react';
import { useStyle } from './styles';
import { View } from 'react-native';
import { Typography } from '../../../core/components/Typography/Typography';
import { SvgXml } from 'react-native-svg';
import { errorPage } from '../../../core/assets/icons';
import Button, { BUTTON_SIZE } from '../Button/Button';
const ErrorComponent = ({
  title,
  description,
  themeStyle,
  icon = errorPage,
  onPress
}) => {
  const styles = useStyle(themeStyle);
  return /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(SvgXml, {
    xml: icon()
  }), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Typography.Headline, {
    style: styles.title
  }, title), description && /*#__PURE__*/React.createElement(Typography.Caption, {
    style: styles.description
  }, description)), onPress && /*#__PURE__*/React.createElement(Button, {
    type: "primary",
    onPress: onPress,
    style: styles.button,
    size: BUTTON_SIZE.LARGE
  }, "Go back"));
};
export default /*#__PURE__*/memo(ErrorComponent);
//# sourceMappingURL=ErrorComponent.js.map