// Module ID: 1226 // Function ID: 1227 // Name: resolveTheme // Dependencies: [1227, 1183, 1184, 1220, 1185, 7081, 1228, 1186, 2] // Exports: default // Module 1226 (resolveTheme) import AuthenticationUtils from "AuthenticationUtils" /* 7081 */; import CustomThemeMobileStore from "CustomThemeMobileStore" /* 1227 */; import SelectivelySyncedUserSettingsStore from "SelectivelySyncedUserSettingsStore" /* 1183 */; import UnsyncedUserSettingsStore from "UnsyncedUserSettingsStore" /* 1184 */; import UserSettingsProtoStore from "UserSettingsProtoStore" /* 1220 */; require = fn; const ThemeConstants = fn(1185); ({ PROTO_THEME_MAP_MOBILE_REFRESH: metroRequire, SystemTheme: closure_7, SystemThemeState: closure_8 } = ThemeConstants); const size = fn(2); const result = size.fileFinishedImporting("modules/themes/resolveTheme.native.tsx"); export default function resolveTheme(arg0, arg1) { const previewTheme = CustomThemeMobileStore.getPreviewTheme(); if (undefined !== previewTheme) { return previewTheme.baseTheme; } else { if (!obj6.isAuthenticated()) { if (arg0 !== constants.NO_PREFERENCE) { return tmp17(1228).resolveThemeWithCustomSettings(arg1[arg0], CustomThemeMobileStore.getCustomTheme()); } } const appearanceSettings = SelectivelySyncedUserSettingsStore.getAppearanceSettings(); let theme; if (appearanceSettings != null) { theme = appearanceSettings.theme; } const appearance = UserSettingsProtoStore.settings.appearance; if (null != appearanceSettings) { const clientThemeSettings2 = appearanceSettings.clientThemeSettings; let prop; if (clientThemeSettings2 != null) { prop = clientThemeSettings2.customUserThemeSettings; } let customUserThemeSettings = prop; } else if (appearance != null) { const clientThemeSettings = appearance.clientThemeSettings; if (clientThemeSettings != null) { customUserThemeSettings = clientThemeSettings.customUserThemeSettings; } } if (null != theme) { return tmp17(1228).resolveThemeWithCustomSettings(theme, customUserThemeSettings); } else { let theme1; if (appearance != null) { theme1 = appearance.theme; } if (theme1 == null) { theme1 = tmp17(1186).Theme.UNSET; } if (theme1 === tmp17(1186).Theme.UNSET) { if (arg0 !== constants.NO_PREFERENCE) { let themeWithCustomSettings = tmp17(1228).resolveThemeWithCustomSettings(arg1[arg0], customUserThemeSettings); const tmp17Result5 = tmp17(1228); } return themeWithCustomSettings; } themeWithCustomSettings = tmp17(1228).resolveThemeWithCustomSettings(timestampProducer[theme1], customUserThemeSettings); const tmp17Result6 = tmp17(1228); } obj6 = AuthenticationUtils; } };