// Module ID: 1344 // Function ID: 1345 // Name: resolveTheme // Dependencies: [1345, 1302, 1303, 1339, 1304, 1366, 1346, 1305, 2] // Exports: default // Module 1344 (resolveTheme) import getToken from "getToken" /* 1366 */; import closure_2 from "reset" /* 1345 */; import closure_3 from "initialize" /* 1302 */; import closure_4 from "CHANNEL_SIDEBAR_WIDTH" /* 1303 */; import closure_5 from "handleConnectionClosedOrResumed" /* 1339 */; import SystemThemeState from "SystemThemeState" /* 1304 */; require = arg1; ({ PROTO_THEME_MAP_MOBILE_REFRESH: closure_6, SystemTheme: error, SystemThemeState: closure_8 } = 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 (!obj6.isAuthenticated()) { if (arg0 !== constants.NO_PREFERENCE) { let tmp17Result = tmp17(1346); return tmp17Result.resolveThemeWithCustomSettings(arg1[arg0], previewTheme.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) { tmp17Result = tmp17(1346); return tmp17Result.resolveThemeWithCustomSettings(theme, customUserThemeSettings); } else { let theme1; if (appearance != null) { theme1 = appearance.theme; } if (theme1 == null) { theme1 = tmp17(1305).Theme.UNSET; } if (theme1 === tmp17(1305).Theme.UNSET) { if (arg0 !== constants.NO_PREFERENCE) { let themeWithCustomSettings = tmp17(1346).resolveThemeWithCustomSettings(arg1[arg0], customUserThemeSettings); const tmp17Result1 = tmp17(1346); } return themeWithCustomSettings; } themeWithCustomSettings = tmp17(1346).resolveThemeWithCustomSettings(table[theme1], customUserThemeSettings); const tmp17Result2 = tmp17(1346); } obj6 = getToken; } };