import { createNativeStackNavigator } from '@react-navigation/native-stack'; import React, { lazy } from 'react'; import { Platform } from 'react-native'; import navigationStyle, { CloseButtonPosition } from '../components/navigationStyle'; import { useTheme } from '../components/themes'; import loc from '../loc'; import { withLazySuspense } from './LazyLoadingIndicator'; import { ScanQRCodeParamList } from './DetailViewStackParamList'; export type AddWalletStackParamList = { AddWallet: { entropy?: string; words?: number; }; ImportWallet?: { label?: string; triggerImport?: boolean; onBarScanned?: string; }; ImportWalletDiscovery: { importText: string; askPassphrase: boolean; searchAccounts: boolean; }; ImportSpeed: undefined; ImportCustomDerivationPath: { importText: string; password: string | undefined; }; PleaseBackup: { walletID: string; }; PleaseBackupLNDHub: { walletID: string; }; ProvideEntropy: { words: number; entropy?: string; }; WalletsAddMultisig: { walletLabel: string; }; MultisigAdvanced: { m: number; n: number; format: string; onSave: (m: number, n: number, format: string) => void; }; WalletsAddMultisigStep2: { m: number; n: number; walletLabel: string; format: string; onBarScanned?: string; sheetAction?: string; sheetImportText?: string; sheetAskPassphrase?: boolean; }; WalletsAddMultisigVaultKeySheet: { keyIndex: number; seed: string; }; WalletsAddMultisigProvideMnemonicsSheet: { importText: string; askPassphrase: boolean; }; WalletsAddMultisigCosignerXpubSheet: { cosignerXpub: string; cosignerXpubURv2: string; cosignerXpubFilename: string; }; WalletsAddMultisigHelp: undefined; ScanQRCode: ScanQRCodeParamList; }; const Stack = createNativeStackNavigator(); const WalletsAdd = lazy(() => import('../screen/wallets/Add')); const ImportCustomDerivationPath = lazy(() => import('../screen/wallets/ImportCustomDerivationPath')); const ImportWalletDiscovery = lazy(() => import('../screen/wallets/ImportWalletDiscovery')); const ImportSpeed = lazy(() => import('../screen/wallets/ImportSpeed')); const ImportWallet = lazy(() => import('../screen/wallets/ImportWallet')); const PleaseBackup = lazy(() => import('../screen/wallets/PleaseBackup')); const PleaseBackupLNDHub = lazy(() => import('../screen/wallets/pleaseBackupLNDHub')); const ProvideEntropy = lazy(() => import('../screen/wallets/ProvideEntropy')); const WalletsAddMultisig = lazy(() => import('../screen/wallets/WalletsAddMultisig')); const MultisigAdvanced = lazy(() => import('../screen/wallets/MultisigAdvanced')); const WalletsAddMultisigStep2 = lazy(() => import('../screen/wallets/addMultisigStep2')); const WalletsAddMultisigHelp = lazy(() => import('../screen/wallets/addMultisigHelp')); const WalletsAddMultisigVaultKeySheet = lazy(() => import('../screen/wallets/WalletsAddMultisigVaultKeySheet')); const WalletsAddMultisigProvideMnemonicsSheet = lazy(() => import('../screen/wallets/WalletsAddMultisigProvideMnemonicsSheet')); const WalletsAddMultisigCosignerXpubSheet = lazy(() => import('../screen/wallets/WalletsAddMultisigCosignerXpubSheet')); const ScanQRCode = lazy(() => import('../screen/send/ScanQRCode')); const AddComponent = withLazySuspense(WalletsAdd); const ImportWalletDiscoveryComponent = withLazySuspense(ImportWalletDiscovery); const ImportCustomDerivationPathComponent = withLazySuspense(ImportCustomDerivationPath); const ImportWalletComponent = withLazySuspense(ImportWallet); const ImportSpeedComponent = withLazySuspense(ImportSpeed); const PleaseBackupComponent = withLazySuspense(PleaseBackup); const PleaseBackupLNDHubComponent = withLazySuspense(PleaseBackupLNDHub); const ProvideEntropyComponent = withLazySuspense(ProvideEntropy); const WalletsAddMultisigComponent = withLazySuspense(WalletsAddMultisig); const MultisigAdvancedComponent = withLazySuspense(MultisigAdvanced); const WalletsAddMultisigStep2Component = withLazySuspense(WalletsAddMultisigStep2); const WalletsAddMultisigHelpComponent = withLazySuspense(WalletsAddMultisigHelp); const WalletsAddMultisigVaultKeySheetComponent = withLazySuspense(WalletsAddMultisigVaultKeySheet); const WalletsAddMultisigProvideMnemonicsSheetComponent = withLazySuspense(WalletsAddMultisigProvideMnemonicsSheet); const WalletsAddMultisigCosignerXpubSheetComponent = withLazySuspense(WalletsAddMultisigCosignerXpubSheet); const ScanQRCodeComponent = withLazySuspense(ScanQRCode); const multisigSheetAllowedDetents = Platform.OS === 'ios' ? 'fitToContents' : [0.9]; const AddWalletStack = () => { const theme = useTheme(); return ( ); }; export default AddWalletStack;