import * as React from 'react'; import type Animated from 'react-native-reanimated'; import type { Tab } from '../../common/SharedProps'; import type { TabsProps } from '../components/Tabs'; import { Tabs } from '../components/Tabs'; export function useRenderTabs( tabsProps: Omit & { tabs?: Tab[]; horizontalScrollValue: Animated.SharedValue; } ) { const { activeTab, horizontalScrollValue, onTabPressed, tabTextActiveStyle, tabTextContainerActiveStyle, tabTextContainerStyle, tabTextStyle, tabUnderlineColor, tabWrapperStyle, tabs, tabsContainerBackgroundColor, tabsContainerHorizontalPadding, tabsContainerStyle, } = tabsProps; return React.useCallback(() => { if (!tabs) { return null; } return ( ); }, [ activeTab, horizontalScrollValue, onTabPressed, tabTextActiveStyle, tabTextContainerActiveStyle, tabTextContainerStyle, tabTextStyle, tabUnderlineColor, tabWrapperStyle, tabs, tabsContainerBackgroundColor, tabsContainerHorizontalPadding, tabsContainerStyle, ]); }