import React from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, View, Text, Platform } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { hitSlop } from '../../constants';
import { useTheme } from '../../contexts/theme';
import { testIdWithKey } from '../../utils/testable';
const defaultIconSize = 24;
const defaultStatusAndNavbarHeight = Platform.OS === 'ios' ? 44 : undefined;
const FauxNavigationBar = _ref => {
  let {
    title,
    onHomeTouched
  } = _ref;
  const {
    TextTheme,
    ColorPallet
  } = useTheme();
  const {
    t
  } = useTranslation();
  const styles = StyleSheet.create({
    container: {
      justifyContent: 'center',
      alignItems: 'flex-end',
      flexDirection: 'row',
      backgroundColor: 'ColorPallet.brand.primary',
      height: defaultStatusAndNavbarHeight
    },
    content: {
      flexDirection: 'row',
      justifyContent: 'space-between'
    },
    label: {
      ...TextTheme.normal,
      color: ColorPallet.brand.headerText,
      fontSize: 17,
      fontWeight: 'bold',
      flexGrow: 1,
      textAlign: 'center',
      paddingBottom: 12
    }
  });
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }), /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(View, {
    style: styles.content
  }, /*#__PURE__*/React.createElement(Text, {
    style: styles.label
  }, title), onHomeTouched && /*#__PURE__*/React.createElement(TouchableOpacity, {
    accessibilityLabel: t('Global.Home'),
    accessibilityRole: 'button',
    testID: testIdWithKey('HomeButton'),
    onPress: onHomeTouched,
    hitSlop: hitSlop
  }, /*#__PURE__*/React.createElement(Icon, {
    name: "home",
    size: defaultIconSize,
    color: ColorPallet.brand.headerIcon
  })))));
};
export default FauxNavigationBar;
//# sourceMappingURL=FauxNavigationBar.js.map