You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
36 KiB

{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"state\", \"descriptors\", \"dimensions\", \"insets\", \"style\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { MissingIcon } from '@react-navigation/elements';\nimport { CommonActions, NavigationContext, NavigationRouteContext, useLinkBuilder, useTheme } from '@react-navigation/native';\nimport React from 'react';\nimport Animated from \"react-native-web/dist/exports/Animated\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { useSafeAreaFrame } from 'react-native-safe-area-context';\nimport BottomTabBarHeightCallbackContext from \"../utils/BottomTabBarHeightCallbackContext\";\nimport useIsKeyboardShown from \"../utils/useIsKeyboardShown\";\nimport BottomTabItem from \"./BottomTabItem\";\nvar DEFAULT_TABBAR_HEIGHT = 49;\nvar COMPACT_TABBAR_HEIGHT = 32;\nvar DEFAULT_MAX_TAB_ITEM_WIDTH = 125;\nvar useNativeDriver = Platform.OS !== 'web';\nvar shouldUseHorizontalLabels = function shouldUseHorizontalLabels(_ref) {\n var state = _ref.state,\n descriptors = _ref.descriptors,\n layout = _ref.layout,\n dimensions = _ref.dimensions;\n var tabBarLabelPosition = descriptors[state.routes[state.index].key].options.tabBarLabelPosition;\n if (tabBarLabelPosition) {\n switch (tabBarLabelPosition) {\n case 'beside-icon':\n return true;\n case 'below-icon':\n return false;\n }\n }\n if (layout.width >= 768) {\n var maxTabWidth = state.routes.reduce(function (acc, route) {\n var tabBarItemStyle = descriptors[route.key].options.tabBarItemStyle;\n var flattenedStyle = StyleSheet.flatten(tabBarItemStyle);\n if (flattenedStyle) {\n if (typeof flattenedStyle.width === 'number') {\n return acc + flattenedStyle.width;\n } else if (typeof flattenedStyle.maxWidth === 'number') {\n return acc + flattenedStyle.maxWidth;\n }\n }\n return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;\n }, 0);\n return maxTabWidth <= layout.width;\n } else {\n return dimensions.width > dimensions.height;\n }\n};\nvar getPaddingBottom = function getPaddingBottom(insets) {\n return Math.max(insets.bottom - Platform.select({\n ios: 4,\n default: 0\n }), 0);\n};\nexport var getTabBarHeight = function getTabBarHeight(_ref2) {\n var _StyleSheet$flatten;\n var state = _ref2.state,\n descriptors = _ref2.descriptors,\n dimensions = _ref2.dimensions,\n insets = _ref2.insets,\n style = _ref2.style,\n rest = _objectWithoutProperties(_ref2, _excluded);\n var customHeight = (_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height;\n if (typeof customHeight === 'number') {\n return customHeight;\n }\n var isLandscape = dimensions.width > dimensions.height;\n var horizontalLabels = shouldUseHorizontalLabels(_objectSpread({\n state: state,\n descriptors: descriptors,\n dimensions: dimensions\n }, rest));\n var paddingBottom = getPaddingBottom(insets);\n if (Platform.OS === 'ios' && !Platform.isPad && isLandscape && horizontalLabels) {\n return COMPACT_TABBAR_HEIGHT + paddingBottom;\n }\n return DEFAULT_TABBAR_HEIGHT + paddingBottom;\n};\nexport default function BottomTabBar(_ref3) {\n var state = _ref3.state,\n navigation = _ref3.navigation,\n descriptors = _ref3.descriptors,\n insets = _ref3.insets,\n style = _ref3.style;\n var _useTheme = useTheme(),\n colors = _useTheme.colors;\n var buildLink = useLinkBuilder();\n var focusedRoute = state.routes[state.index];\n var focusedDescriptor = descriptors[focusedRoute.key];\n var focusedOptions = focusedDescriptor.options;\n var tabBarShowLabel = focusedOptions.tabBarShowLabel,\n _focusedOptions$tabBa = focusedOptions.tabBarHideOnKeyboard,\n tabBarHideOnKeyboard = _focusedOptions$tabBa === void 0 ? false : _focusedOptions$tabBa,\n tabBarVisibilityAnimationConfig = focusedOptions.tabBarVisibilityAnimationConfig,\n tabBarStyle = focusedOptions.tabBarStyle,\n tabBarBackground = focusedOptions.tabBarBackground,\n tabBarActiveTintColor = focusedOptions.tabBarActiveTintColor,\n tabBarInactiveTintColor = focusedOptions.tabBarInactiveTintColor,\n tabBarActiveBackgroundColor = focusedOptions.tabBarActiveBackgroundColor,\n tabBarInactiveBackgroundColor = focusedOptions.tabBarInactiveBackgroundColor;\n var dimensions = useSafeAreaFrame();\n var isKeyboardShown = useIsKeyboardShown();\n var onHeightChange = React.useContext(BottomTabBarHeightCallbackContext);\n var shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);\n var visibilityAnimationConfigRef = React.useRef(tabBarVisibilityAnimationConfig);\n React.useEffect(function () {\n visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;\n });\n var _React$useState = React.useState(!shouldShowTabBar),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n isTabBarHidden = _React$useState2[0],\n setIsTabBarHidden = _React$useState2[1];\n var _React$useState3 = React.useState(function () {\n return new Animated.Value(shouldShowTabBar ? 1 : 0);\n }),\n _React$useState4 = _slicedToArray(_React$useState3, 1),\n visible = _React$useState4[0];\n React.useEffect(function () {\n var visibilityAnimationConfig = visibilityAnimationConfigRef.current;\n if (shouldShowTabBar) {\n var _visibilityAnimationC, _visibilityAnimationC2;\n var animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? Animated.spring : Animated.timing;\n animation(visible, _objectSpread({\n toValue: 1,\n useNativeDriver: useNativeDriver,\n duration: 250\n }, visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC2 = visibilityAnimationConfig.show) === null || _visibilityAnimationC2 === void 0 ? void 0 : _visibilityAnimationC2.config)).start(function (_ref4) {\n var finished = _ref4.finished;\n if (finished) {\n setIsTabBarHidden(false);\n }\n });\n } else {\n var _visibilityAnimationC3, _visibilityAnimationC4;\n setIsTabBarHidden(true);\n var _animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? Animated.spring : Animated.timing;\n _animation(visible, _objectSpread({\n toValue: 0,\n useNativeDriver: useNativeDriver,\n duration: 200\n }, visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config)).start();\n }\n return function () {\n return visible.stopAnimation();\n };\n }, [visible, shouldShowTabBar]);\n var _React$useState5 = React.useState({\n height: 0,\n width: dimensions.width\n }),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n layout = _React$useState6[0],\n setLayout = _React$useState6[1];\n var handleLayout = function handleLayout(e) {\n var _e$nativeEvent$layout = e.nativeEvent.layout,\n height = _e$nativeEvent$layout.height,\n width = _e$nativeEvent$layout.width;\n onHeightChange === null || onHeightChange === void 0 ? void 0 : onHeightChange(height);\n setLayout(function (layout) {\n if (height === layout.height && width === layout.width) {\n return layout;\n } else {\n return {\n height: height,\n width: width\n };\n }\n });\n };\n var routes = state.routes;\n var paddingBottom = getPaddingBottom(insets);\n var tabBarHeight = getTabBarHeight({\n state: state,\n descriptors: descriptors,\n insets: insets,\n dimensions: dimensions,\n layout: layout,\n style: [tabBarStyle, style]\n });\n var hasHorizontalLabels = shouldUseHorizontalLabels({\n state: state,\n descriptors: descriptors,\n dimensions: dimensions,\n layout: layout\n });\n var tabBarBackgroundElement = tabBarBackground === null || tabBarBackground === void 0 ? void 0 : tabBarBackground();\n return React.createElement(Animated.View, {\n style: [styles.tabBar, {\n backgroundColor: tabBarBackgroundElement != null ? 'transparent' : colors.card,\n borderTopColor: colors.border\n }, {\n transform: [{\n translateY: visible.interpolate({\n inputRange: [0, 1],\n outputRange: [layout.height + paddingBottom + StyleSheet.hairlineWidth, 0]\n })\n }],\n position: isTabBarHidden ? 'absolute' : null\n }, {\n height: tabBarHeight,\n paddingBottom: paddingBottom,\n paddingHorizontal: Math.max(insets.left, insets.right)\n }, tabBarStyle],\n pointerEvents: isTabBarHidden ? 'none' : 'auto',\n onLayout: handleLayout\n }, React.createElement(View, {\n pointerEvents: \"none\",\n style: StyleSheet.absoluteFill\n }, tabBarBackgroundElement), React.createElement(View, {\n accessibilityRole: \"tablist\",\n style: styles.content\n }, routes.map(function (route, index) {\n var _options$tabBarIcon;\n var focused = index === state.index;\n var options = descriptors[route.key].options;\n var onPress = function onPress() {\n var event = navigation.emit({\n type: 'tabPress',\n target: route.key,\n canPreventDefault: true\n });\n if (!focused && !event.defaultPrevented) {\n navigation.dispatch(_objectSpread(_objectSpread({}, CommonActions.navigate({\n name: route.name,\n merge: true\n })), {}, {\n target: state.key\n }));\n }\n };\n var onLongPress = function onLongPress() {\n navigation.emit({\n type: 'tabLongPress',\n target: route.key\n });\n };\n var label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;\n var accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && Platform.OS === 'ios' ? label + \", tab, \" + (index + 1) + \" of \" + routes.length : undefined;\n return React.createElement(NavigationContext.Provider, {\n key: route.key,\n value: descriptors[route.key].navigation\n }, React.createElement(NavigationRouteContext.Provider, {\n value: route\n }, React.createElement(BottomTabItem, {\n route: route,\n descriptor: descriptors[route.key],\n focused: focused,\n horizontal: hasHorizontalLabels,\n onPress: onPress,\n onLongPress: onLongPress,\n accessibilityLabel: accessibilityLabel,\n to: buildLink(route.name, route.params),\n testID: options.tabBarTestID,\n allowFontScaling: options.tabBarAllowFontScaling,\n activeTintColor: tabBarActiveTintColor,\n inactiveTintColor: tabBarInactiveTintColor,\n activeBackgroundColor: tabBarActiveBackgroundColor,\n inactiveBackgroundColor: tabBarInactiveBackgroundColor,\n button: options.tabBarButton,\n icon: (_options$tabBarIcon = options.tabBarIcon) != null ? _options$tabBarIcon : function (_ref5) {\n var color = _ref5.color,\n size = _ref5.size;\n return React.createElement(MissingIcon, {\n color: color,\n size: size\n });\n },\n badge: options.tabBarBadge,\n badgeStyle: options.tabBarBadgeStyle,\n label: label,\n showLabel: tabBarShowLabel,\n labelStyle: options.tabBarLabelStyle,\n iconStyle: options.tabBarIconStyle,\n style: options.tabBarItemStyle\n })));\n })));\n}\nvar styles = StyleSheet.create({\n tabBar: {\n left: 0,\n right: 0,\n bottom: 0,\n borderTopWidth: StyleSheet.hairlineWidth,\n elevation: 8\n },\n content: {\n flex: 1,\n flexDirection: 'row'\n }\n});","map":{"version":3,"sources":["BottomTabBar.tsx"],"names":["MissingIcon","CommonActions","NavigationContext","NavigationRouteContext","useLinkBuilder","useTheme","React","useSafeAreaFrame","BottomTabBarHeightCallbackContext","useIsKeyboardShown","BottomTabItem","DEFAULT_TABBAR_HEIGHT","COMPACT_TABBAR_HEIGHT","DEFAULT_MAX_TAB_ITEM_WIDTH","useNativeDriver","Platform","OS","shouldUseHorizontalLabels","state","descriptors","layout","dimensions","tabBarLabelPosition","routes","index","key","options","width","maxTabWidth","reduce","acc","route","tabBarItemStyle","flattenedStyle","StyleSheet","flatten","maxWidth","height","getPaddingBottom","insets","Math","max","bottom","select","ios","default","getTabBarHeight","style","rest","customHeight","isLandscape","horizontalLabels","paddingBottom","isPad","BottomTabBar","navigation","colors","buildLink","focusedRoute","focusedDescriptor","focusedOptions","tabBarShowLabel","tabBarHideOnKeyboard","tabBarVisibilityAnimationConfig","tabBarStyle","tabBarBackground","tabBarActiveTintColor","tabBarInactiveTintColor","tabBarActiveBackgroundColor","tabBarInactiveBackgroundColor","isKeyboardShown","onHeightChange","useContext","shouldShowTabBar","visibilityAnimationConfigRef","useRef","useEffect","current","isTabBarHidden","setIsTabBarHidden","useState","visible","Animated","Value","visibilityAnimationConfig","animation","show","spring","timing","toValue","duration","config","start","finished","hide","stopAnimation","setLayout","handleLayout","e","nativeEvent","tabBarHeight","hasHorizontalLabels","tabBarBackgroundElement","styles","tabBar","backgroundColor","card","borderTopColor","border","transform","translateY","interpolate","inputRange","outputRange","hairlineWidth","position","paddingHorizontal","left","right","absoluteFill","content","map","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","navigate","name","merge","onLongPress","label","tabBarLabel","undefined","title","accessibilityLabel","tabBarAccessibilityLabel","length","params","tabBarTestID","tabBarAllowFontScaling","tabBarButton","tabBarIcon","color","size","tabBarBadge","tabBarBadgeStyle","tabBarLabelStyle","tabBarIconStyle","create","borderTopWidth","elevation","flex","flexDirection"],"mappings":";;;;;;AAAA,SAASA,WAAW,QAAQ,4BAA4B;AACxD,SACEC,aAAa,EACbC,iBAAiB,EACjBC,sBAAsB,EAGtBC,cAAc,EACdC,QAAQ,QACH,0BAA0B;AACjC,OAAOC,KAAK,MAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAUzB,SAAqBC,gBAAgB,QAAQ,gCAAgC;AAG7E,OAAOC,iCAAiC;AACxC,OAAOC,kBAAkB;AACzB,OAAOC,aAAa;AAMpB,IAAMC,qBAAqB,GAAG,EAAE;AAChC,IAAMC,qBAAqB,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ACnC,KAAK,EAAE9H,OAAO,CAACM;IAAgB,CAAA,CAC/B,CAC8B,CACP;EAEjC,CAAC,CAAC,CACG,CACO;AAEpB;AAEA,IAAMuE,MAAM,GAAGrE,UAAU,CAACuH,MAAM,CAAC;EAC/BjD,MAAM,EAAE;IACNa,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR5E,MAAM,EAAE,CAAC;IACTgH,cAAc,EAAExH,UAAU,CAACgF,aAAa;IACxCyC,SAAS,EAAE;EACb,CAAC;EACDnC,OAAO,EAAE;IACPoC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","sourceRoot":"../../src","sourcesContent":["import { MissingIcon } from '@react-navigation/elements';\nimport { CommonActions, NavigationContext, NavigationRouteContext, useLinkBuilder, useTheme } from '@react-navigation/native';\nimport React from 'react';\nimport { Animated, Platform, StyleSheet, View } from 'react-native';\nimport { useSafeAreaFrame } from 'react-native-safe-area-context';\nimport BottomTabBarHeightCallbackContext from '../utils/BottomTabBarHeightCallbackContext';\nimport useIsKeyboardShown from '../utils/useIsKeyboardShown';\nimport BottomTabItem from './BottomTabItem';\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst COMPACT_TABBAR_HEIGHT = 32;\nconst DEFAULT_MAX_TAB_ITEM_WIDTH = 125;\nconst useNativeDriver = Platform.OS !== 'web';\nconst shouldUseHorizontalLabels = _ref => {\n let {\n state,\n descriptors,\n layout,\n dimensions\n } = _ref;\n const {\n tabBarLabelPosition\n } = descriptors[state.routes[state.index].key].options;\n if (tabBarLabelPosition) {\n switch (tabBarLabelPosition) {\n case 'beside-icon':\n return true;\n case 'below-icon':\n return false;\n }\n }\n if (layout.width >= 768) {\n // Screen size matches a tablet\n const maxTabWidth = state.routes.reduce((acc, route) => {\n const {\n tabBarItemStyle\n } = descriptors[route.key].options;\n const flattenedStyle = StyleSheet.flatten(tabBarItemStyle);\n if (flattenedStyle) {\n if (typeof flattenedStyle.width === 'number') {\n return acc + flattenedStyle.width;\n } else if (typeof flattenedStyle.maxWidth === 'number') {\n return acc + flattenedStyle.maxWidth;\n }\n }\n return acc + DEFAULT_MAX_TAB_ITEM_WIDTH;\n }, 0);\n return maxTabWidth <= layout.width;\n } else {\n return dimensions.width > dimensions.height;\n }\n};\nconst getPaddingBottom = insets => Math.max(insets.bottom - Platform.select({\n ios: 4,\n default: 0\n}), 0);\nexport const getTabBarHeight = _ref2 => {\n var _StyleSheet$flatten;\n let {\n state,\n descriptors,\n dimensions,\n insets,\n style,\n ...rest\n } = _ref2;\n // @ts-ignore\n const customHeight = (_StyleSheet$flatten = StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.height;\n if (typeof customHeight === 'number') {\n return customHeight;\n }\n const isLandscape = dimensions.width > dimensions.height;\n const horizontalLabels = shouldUseHorizontalLabels({\n state,\n descriptors,\n dimensions,\n ...rest\n });\n const paddingBottom = getPaddingBottom(insets);\n if (Platform.OS === 'ios' && !Platform.isPad && isLandscape && horizontalLabels) {\n return COMPACT_TABBAR_HEIGHT + paddingBottom;\n }\n return DEFAULT_TABBAR_HEIGHT + paddingBottom;\n};\nexport default function BottomTabBar(_ref3) {\n let {\n state,\n navigation,\n descriptors,\n insets,\n style\n } = _ref3;\n const {\n colors\n } = useTheme();\n const buildLink = useLinkBuilder();\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n const {\n tabBarShowLabel,\n tabBarHideOnKeyboard = false,\n tabBarVisibilityAnimationConfig,\n tabBarStyle,\n tabBarBackground,\n tabBarActiveTintColor,\n tabBarInactiveTintColor,\n tabBarActiveBackgroundColor,\n tabBarInactiveBackgroundColor\n } = focusedOptions;\n const dimensions = useSafeAreaFrame();\n const isKeyboardShown = useIsKeyboardShown();\n const onHeightChange = React.useContext(BottomTabBarHeightCallbackContext);\n const shouldShowTabBar = !(tabBarHideOnKeyboard && isKeyboardShown);\n const visibilityAnimationConfigRef = React.useRef(tabBarVisibilityAnimationConfig);\n React.useEffect(() => {\n visibilityAnimationConfigRef.current = tabBarVisibilityAnimationConfig;\n });\n const [isTabBarHidden, setIsTabBarHidden] = React.useState(!shouldShowTabBar);\n const [visible] = React.useState(() => new Animated.Value(shouldShowTabBar ? 1 : 0));\n React.useEffect(() => {\n const visibilityAnimationConfig = visibilityAnimationConfigRef.current;\n if (shouldShowTabBar) {\n var _visibilityAnimationC, _visibilityAnimationC2;\n const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC = visibilityAnimationConfig.show) === null || _visibilityAnimationC === void 0 ? void 0 : _visibilityAnimationC.animation) === 'spring' ? Animated.spring : Animated.timing;\n animation(visible, {\n toValue: 1,\n useNativeDriver,\n duration: 250,\n ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC2 = visibilityAnimationConfig.show) === null || _visibilityAnimationC2 === void 0 ? void 0 : _visibilityAnimationC2.config)\n }).start(_ref4 => {\n let {\n finished\n } = _ref4;\n if (finished) {\n setIsTabBarHidden(false);\n }\n });\n } else {\n var _visibilityAnimationC3, _visibilityAnimationC4;\n setIsTabBarHidden(true);\n const animation = (visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC3 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC3 === void 0 ? void 0 : _visibilityAnimationC3.animation) === 'spring' ? Animated.spring : Animated.timing;\n animation(visible, {\n toValue: 0,\n useNativeDriver,\n duration: 200,\n ...(visibilityAnimationConfig === null || visibilityAnimationConfig === void 0 ? void 0 : (_visibilityAnimationC4 = visibilityAnimationConfig.hide) === null || _visibilityAnimationC4 === void 0 ? void 0 : _visibilityAnimationC4.config)\n }).start();\n }\n return () => visible.stopAnimation();\n }, [visible, shouldShowTabBar]);\n const [layout, setLayout] = React.useState({\n height: 0,\n width: dimensions.width\n });\n const handleLayout = e => {\n const {\n height,\n width\n } = e.nativeEvent.layout;\n onHeightChange === null || onHeightChange === void 0 ? void 0 : onHeightChange(height);\n setLayout(layout => {\n if (height === layout.height && width === layout.width) {\n return layout;\n } else {\n return {\n height,\n width\n };\n }\n });\n };\n const {\n routes\n } = state;\n const paddingBottom = getPaddingBottom(insets);\n const tabBarHeight = getTabBarHeight({\n state,\n descriptors,\n insets,\n dimensions,\n layout,\n style: [tabBarStyle, style]\n });\n const hasHorizontalLabels = shouldUseHorizontalLabels({\n state,\n descriptors,\n dimensions,\n layout\n });\n const tabBarBackgroundElement = tabBarBackground === null || tabBarBackground === void 0 ? void 0 : tabBarBackground();\n return /*#__PURE__*/React.createElement(Animated.View, {\n style: [styles.tabBar, {\n backgroundColor: tabBarBackgroundElement != null ? 'transparent' : colors.card,\n borderTopColor: colors.border\n }, {\n transform: [{\n translateY: visible.interpolate({\n inputRange: [0, 1],\n outputRange: [layout.height + paddingBottom + StyleSheet.hairlineWidth, 0]\n })\n }],\n // Absolutely position the tab bar so that the content is below it\n // This is needed to avoid gap at bottom when the tab bar is hidden\n position: isTabBarHidden ? 'absolute' : null\n }, {\n height: tabBarHeight,\n paddingBottom,\n paddingHorizontal: Math.max(insets.left, insets.right)\n }, tabBarStyle],\n pointerEvents: isTabBarHidden ? 'none' : 'auto',\n onLayout: handleLayout\n }, /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"none\",\n style: StyleSheet.absoluteFill\n }, tabBarBackgroundElement), /*#__PURE__*/React.createElement(View, {\n accessibilityRole: \"tablist\",\n style: styles.content\n }, routes.map((route, index) => {\n const focused = index === state.index;\n const {\n options\n } = descriptors[route.key];\n const onPress = () => {\n const event = navigation.emit({\n type: 'tabPress',\n target: route.key,\n canPreventDefault: true\n });\n if (!focused && !event.defaultPrevented) {\n navigation.dispatch({\n ...CommonActions.navigate({\n name: route.name,\n merge: true\n }),\n target: state.key\n });\n }\n };\n const onLongPress = () => {\n navigation.emit({\n type: 'tabLongPress',\n target: route.key\n });\n };\n const label = options.tabBarLabel !== undefined ? options.tabBarLabel : options.title !== undefined ? options.title : route.name;\n const accessibilityLabel = options.tabBarAccessibilityLabel !== undefined ? options.tabBarAccessibilityLabel : typeof label === 'string' && Platform.OS === 'ios' ? `${label}, tab, ${index + 1} of ${routes.length}` : undefined;\n return /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n key: route.key,\n value: descriptors[route.key].navigation\n }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, {\n value: route\n }, /*#__PURE__*/React.createElement(BottomTabItem, {\n route: route,\n descriptor: descriptors[route.key],\n focused: focused,\n horizontal: hasHorizontalLabels,\n onPress: onPress,\n onLongPress: onLongPress,\n accessibilityLabel: accessibilityLabel,\n to: buildLink(route.name, route.params),\n testID: options.tabBarTestID,\n allowFontScaling: options.tabBarAllowFontScaling,\n activeTintColor: tabBarActiveTintColor,\n inactiveTintColor: tabBarInactiveTintColor,\n activeBackgroundColor: tabBarActiveBackgroundColor,\n inactiveBackgroundColor: tabBarInactiveBackgroundColor,\n button: options.tabBarButton,\n icon: options.tabBarIcon ?? (_ref5 => {\n let {\n color,\n size\n } = _ref5;\n return /*#__PURE__*/React.createElement(MissingIcon, {\n color: color,\n size: size\n });\n }),\n badge: options.tabBarBadge,\n badgeStyle: options.tabBarBadgeStyle,\n label: label,\n showLabel: tabBarShowLabel,\n labelStyle: options.tabBarLabelStyle,\n iconStyle: options.tabBarIconStyle,\n style: options.tabBarItemStyle\n })));\n })));\n}\nconst styles = StyleSheet.create({\n tabBar: {\n left: 0,\n right: 0,\n bottom: 0,\n borderTopWidth: StyleSheet.hairlineWidth,\n elevation: 8\n },\n content: {\n flex: 1,\n flexDirection: 'row'\n }\n});\n//# sourceMappingURL=BottomTabBar.js.map"]},"metadata":{},"sourceType":"module"}