import { TouchableOpacity } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { SvgXml } from 'react-native-svg';
import { arrowBack } from '../../../../core/assets/icons/xml';
import { useTheme } from 'react-native-paper';
export default function BackButton({
  onPress,
  goBack = true
}) {
  const theme = useTheme();
  const navigation = useNavigation();
  return /*#__PURE__*/React.createElement(TouchableOpacity, {
    onPress: () => {
      if (goBack) {
        navigation.goBack();
      }
      onPress && onPress();
    }
  }, /*#__PURE__*/React.createElement(SvgXml, {
    xml: arrowBack(theme.colors.base),
    width: 24,
    height: 20
  }));
}
//# sourceMappingURL=index.js.map