import { AsyncStorage } from 'react-native'; const STORAGE_PREFIX = '@@expo@@'; /** * A mock implementation of the native kernel module that can be used when loading Home as a regular * project or when running it on web. * * Longer term, it may make sense to natively define a private, unprivileged implementation of the * kernel module and use this implementation only on web. */ export default { sdkVersions: [] as string[], async doesCurrentTaskEnableDevtools(): Promise { return false; }, addDevMenu(): void {}, async getDevMenuItemsToShowAsync(): Promise { return {}; }, selectDevMenuItemWithKey(_key: string): void {}, selectRefresh(): void {}, selectCloseMenu(): void {}, selectGoToHome(): void {}, selectQRReader(): void {}, async setIsLegacyMenuBehaviorEnabledAsync(_enabled: boolean): Promise {}, async getIsNuxFinishedAsync(): Promise { const item = await AsyncStorage.getItem(`${STORAGE_PREFIX}:nux`); return !!item; }, async setIsNuxFinishedAsync(finished: boolean): Promise { if (finished) { await AsyncStorage.setItem(`${STORAGE_PREFIX}:nux`, '1'); } else { await AsyncStorage.removeItem(`${STORAGE_PREFIX}:nux`); } }, async getSessionAsync(): Promise { const json = await AsyncStorage.getItem(`${STORAGE_PREFIX}:session`); return json ? JSON.parse(json) : null; }, async setSessionAsync(session: object): Promise { const json = JSON.stringify(session); await AsyncStorage.setItem(`${STORAGE_PREFIX}:session`, json); }, async removeSessionAsync(): Promise { await AsyncStorage.removeItem(`${STORAGE_PREFIX}:session`); }, onEventSuccess(_eventId: string, _result: object): void {}, onEventFailure(_eventId: string, _message: string): void {}, };