"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactI18next = require("react-i18next");
var _reactNative = require("react-native");
var _reactNativeGestureHandler = require("react-native-gesture-handler");
var _MaterialCommunityIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialCommunityIcons"));
var _constants = require("../../constants");
var _theme = require("../../contexts/theme");
var _testable = require("../../utils/testable");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const defaultIconSize = 24;
const defaultStatusAndNavbarHeight = _reactNative.Platform.OS === 'ios' ? 44 : undefined;
const FauxNavigationBar = _ref => {
  let {
    title,
    onHomeTouched
  } = _ref;
  const {
    TextTheme,
    ColorPallet
  } = (0, _theme.useTheme)();
  const {
    t
  } = (0, _reactI18next.useTranslation)();
  const styles = _reactNative.StyleSheet.create({
    container: {
      justifyContent: 'center',
      alignItems: 'flex-end',
      flexDirection: 'row',
      backgroundColor: 'ColorPallet.brand.primary',
      height: defaultStatusAndNavbarHeight
    },
    content: {
      flexDirection: 'row',
      justifyContent: 'space-between'
    },
    label: {
      ...TextTheme.bold,
      color: ColorPallet.brand.headerText,
      fontSize: 17,
      flexGrow: 1,
      textAlign: 'center',
      paddingBottom: 12
    }
  });
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styles.container
  }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styles.container
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styles.content
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: styles.label
  }, title), onHomeTouched && /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TouchableOpacity, {
    accessibilityLabel: t('Global.Home'),
    accessibilityRole: 'button',
    testID: (0, _testable.testIdWithKey)('HomeButton'),
    onPress: onHomeTouched,
    hitSlop: _constants.hitSlop
  }, /*#__PURE__*/_react.default.createElement(_MaterialCommunityIcons.default, {
    name: "home",
    size: defaultIconSize,
    color: ColorPallet.brand.headerIcon
  })))));
};
var _default = FauxNavigationBar;
exports.default = _default;
//# sourceMappingURL=FauxNavigationBar.js.map