import React from 'react'; import { I18nManager } from 'react-native'; import { createStackNavigator, StackNavigationOptions } from '@react-navigation/stack'; import { createDrawerNavigator } from '@react-navigation/drawer'; import { ThemeContext } from '../theme'; import { ModalAnimation, StackAnimation, defaultHeader, themedHeader } from '../lib/methods/helpers/navigation'; import Sidebar from '../views/SidebarView'; // Chats Stack import RoomView from '../views/RoomView'; import RoomsListView from '../views/RoomsListView'; import RoomActionsView from '../views/RoomActionsView'; import RoomInfoView from '../views/RoomInfoView'; import ReportUserView from '../views/ReportUserView'; import RoomInfoEditView from '../views/RoomInfoEditView'; import RoomMembersView from '../views/RoomMembersView'; import SearchMessagesView from '../views/SearchMessagesView'; import SelectedUsersView from '../views/SelectedUsersView'; import InviteUsersView from '../views/InviteUsersView'; import InviteUsersEditView from '../views/InviteUsersEditView'; import MessagesView from '../views/MessagesView'; import AutoTranslateView from '../views/AutoTranslateView'; import DirectoryView from '../views/DirectoryView'; import NotificationPrefView from '../views/NotificationPreferencesView'; import ForwardLivechatView from '../views/ForwardLivechatView'; import CloseLivechatView from '../views/CloseLivechatView'; import LivechatEditView from '../views/LivechatEditView'; import PickerView from '../views/PickerView'; import ThreadMessagesView from '../views/ThreadMessagesView'; import TeamChannelsView from '../views/TeamChannelsView'; import MarkdownTableView from '../views/MarkdownTableView'; import ReadReceiptsView from '../views/ReadReceiptView'; import CannedResponsesListView from '../views/CannedResponsesListView'; import CannedResponseDetail from '../views/CannedResponseDetail'; import { themes } from '../lib/constants'; // Profile Stack import ProfileView from '../views/ProfileView'; import UserPreferencesView from '../views/UserPreferencesView'; import UserNotificationPrefView from '../views/UserNotificationPreferencesView'; // Display Preferences View import DisplayPrefsView from '../views/DisplayPrefsView'; // Settings Stack import SettingsView from '../views/SettingsView'; import SecurityPrivacyView from '../views/SecurityPrivacyView'; import E2EEncryptionSecurityView from '../views/E2EEncryptionSecurityView'; import LanguageView from '../views/LanguageView'; import ThemeView from '../views/ThemeView'; import DefaultBrowserView from '../views/DefaultBrowserView'; import ScreenLockConfigView from '../views/ScreenLockConfigView'; import MediaAutoDownloadView from '../views/MediaAutoDownloadView'; // Admin Stack import AdminPanelView from '../views/AdminPanelView'; // NewMessage Stack import NewMessageView from '../views/NewMessageView'; import CreateChannelView from '../views/CreateChannelView'; // E2ESaveYourPassword Stack import E2ESaveYourPasswordView from '../views/E2ESaveYourPasswordView'; import E2EHowItWorksView from '../views/E2EHowItWorksView'; // E2EEnterYourPassword Stack import E2EEnterYourPasswordView from '../views/E2EEnterYourPasswordView'; // InsideStackNavigator import AttachmentView from '../views/AttachmentView'; import ModalBlockView from '../views/ModalBlockView'; import JitsiMeetView from '../views/JitsiMeetView'; import StatusView from '../views/StatusView'; import ShareView from '../views/ShareView'; import CreateDiscussionView from '../views/CreateDiscussionView'; import ForwardMessageView from '../views/ForwardMessageView'; import QueueListView from '../ee/omnichannel/views/QueueListView'; import AddChannelTeamView from '../views/AddChannelTeamView'; import AddExistingChannelView from '../views/AddExistingChannelView'; import SelectListView from '../views/SelectListView'; import DiscussionsView from '../views/DiscussionsView'; import ChangeAvatarView from '../views/ChangeAvatarView'; import { AdminPanelStackParamList, ChatsStackParamList, DisplayPrefStackParamList, DrawerParamList, E2EEnterYourPasswordStackParamList, E2ESaveYourPasswordStackParamList, InsideStackParamList, NewMessageStackParamList, ProfileStackParamList, SettingsStackParamList } from './types'; import { isIOS } from '../lib/methods/helpers'; import { TNavigation } from './stackType'; // ChatsStackNavigator const ChatsStack = createStackNavigator(); const ChatsStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( {/* @ts-ignore */} {/* @ts-ignore */} {/* @ts-ignore */} ); }; // ProfileStackNavigator const ProfileStack = createStackNavigator(); const ProfileStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // SettingsStackNavigator const SettingsStack = createStackNavigator(); const SettingsStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // AdminPanelStackNavigator const AdminPanelStack = createStackNavigator(); const AdminPanelStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // DisplayPreferenceNavigator const DisplayPrefStack = createStackNavigator(); const DisplayPrefStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // DrawerNavigator const Drawer = createDrawerNavigator(); const DrawerNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( } useLegacyImplementation={true} screenOptions={{ swipeEnabled: false, headerShown: false, drawerPosition: I18nManager.isRTL ? 'right' : 'left', drawerType: 'back', overlayColor: `rgba(0,0,0,${themes[theme].backdropOpacity})` }} > ); }; // NewMessageStackNavigator const NewMessageStack = createStackNavigator(); const NewMessageStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // E2ESaveYourPasswordStackNavigator const E2ESaveYourPasswordStack = createStackNavigator(); const E2ESaveYourPasswordStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // E2EEnterYourPasswordStackNavigator const E2EEnterYourPasswordStack = createStackNavigator(); const E2EEnterYourPasswordStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; // InsideStackNavigator const InsideStack = createStackNavigator(); const InsideStackNavigator = () => { const { theme } = React.useContext(ThemeContext); return ( ); }; export default InsideStackNavigator;