// Module ID: 1345 // Function ID: 1346 // Name: resolveTheme // Dependencies: [1346, 1303, 1304, 1340, 1305, 1371, 1347, 1306, 1367, 2] // Exports: default // Module 1345 (resolveTheme) import getToken from "getToken" /* 1371 */; import closure_2 from "reset" /* 1346 */; import closure_3 from "initialize" /* 1303 */; import closure_4 from "CHANNEL_SIDEBAR_WIDTH" /* 1304 */; import closure_5 from "handleConnectionClosedOrResumed" /* 1340 */; import SystemThemeState from "SystemThemeState" /* 1305 */; require = arg1; ({ PROTO_THEME_MAP_MOBILE: closure_6, PROTO_THEME_MAP_MOBILE_REFRESH: error, SystemTheme: closure_8, SystemThemeState: c9 } = SystemThemeState); const result = require("set").fileFinishedImporting("modules/themes/resolveTheme.native.tsx"); export default function resolveTheme(arg0, arg1) { previewTheme = previewTheme.getPreviewTheme(); if (undefined !== previewTheme) { return previewTheme.baseTheme; } else { if (!obj7.isAuthenticated()) { if (arg0 !== constants.NO_PREFERENCE) { let tmp16Result = tmp16(1347); return tmp16Result.resolveThemeWithCustomSettings(arg1[arg0], obj.getCustomTheme()); } } appearanceSettings = appearanceSettings.getAppearanceSettings(); let theme; if (appearanceSettings != null) { theme = appearanceSettings.theme; } const appearance = settings.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) { tmp16Result = tmp16(1347); return tmp16Result.resolveThemeWithCustomSettings(theme, customUserThemeSettings); } else { let theme1; if (appearance != null) { theme1 = appearance.theme; } if (theme1 == null) { theme1 = tmp16(1306).Theme.UNSET; } if (theme1 === tmp16(1306).Theme.UNSET) { if (arg0 !== constants.NO_PREFERENCE) { return tmp16(1347).resolveThemeWithCustomSettings(arg1[arg0], customUserThemeSettings); } } const tmp16Result2 = tmp16(1367); const tmp12 = tmp16(1367).isMobileVisualRefreshEnabled("resolveTheme") ? closure_7 : closure_6; return tmp16(1347).resolveThemeWithCustomSettings(tmp12[theme1], customUserThemeSettings); } obj7 = getToken; } obj = previewTheme; };