"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = BackButton;
var _reactNative = require("react-native");
var _native = require("@react-navigation/native");
var _reactNativeSvg = require("react-native-svg");
var _xml = require("../../../../core/assets/icons/xml");
var _reactNativePaper = require("react-native-paper");
function BackButton({
  onPress,
  goBack = true
}) {
  const theme = (0, _reactNativePaper.useTheme)();
  const navigation = (0, _native.useNavigation)();
  return /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
    onPress: () => {
      if (goBack) {
        navigation.goBack();
      }
      onPress && onPress();
    }
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgXml, {
    xml: (0, _xml.arrowBack)(theme.colors.base),
    width: 24,
    height: 20
  }));
}
//# sourceMappingURL=index.js.map