import { HeaderCenter, HeaderLeft } from '@components/Header' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { TabMeStackParamList } from '@utils/navigation/navigators' import React from 'react' import { useTranslation } from 'react-i18next' import { Platform } from 'react-native' import TabMeBookmarks from './Me/Bookmarks' import TabMeConversations from './Me/Cconversations' import TabMeFavourites from './Me/Favourites' import TabMeLists from './Me/Lists' import TabMeListsList from './Me/ListsList' import TabMeProfile from './Me/Profile' import TabMePush from './Me/Push' import TabMeRoot from './Me/Root' import TabMeSettings from './Me/Settings' import TabMeSettingsFontsize from './Me/SettingsFontsize' import TabMeSwitch from './Me/Switch' import TabSharedRoot from './Shared/Root' const Stack = createNativeStackNavigator() const TabMe = React.memo( () => { const { t } = useTranslation('screenTabs') return ( ({ title: t('me.stacks.bookmarks.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => navigation.pop(1)} /> })} /> ({ title: t('me.stacks.conversations.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => navigation.pop(1)} /> })} /> ({ title: t('me.stacks.favourites.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => navigation.pop(1)} /> })} /> ({ title: t('me.stacks.lists.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => navigation.pop(1)} /> })} /> ({ title: t('me.stacks.list.name', { list: route.params.title }), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => navigation.pop(1)} /> })} /> ({ presentation: 'modal', headerShown: true, title: t('me.stacks.push.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => ( navigation.goBack()} /> ) })} /> ({ title: t('me.stacks.settings.name'), headerLeft: () => navigation.pop(1)} /> })} /> ({ title: t('me.stacks.fontSize.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => navigation.pop(1)} /> })} /> ({ presentation: 'modal', headerShown: true, title: t('me.stacks.switch.name'), ...(Platform.OS === 'android' && { headerCenter: () => ( ) }), headerLeft: () => ( navigation.goBack()} /> ) })} /> {TabSharedRoot({ Stack })} ) }, () => true ) export default TabMe