/* Metro module 13109; source: modules/themes/RootThemeContextProvider.native.tsx; dependencies: [31, 4502, 1310, 482, 33, 566, 4003, 1357, 13110, 3868, 10901, 2] */ import ThemeStore from '../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */ import UseColorThemeBackground from '../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */ import AccessibilityStore from '../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */ import * as MobileVisualRefreshExperimentModule from './experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */ import * as RootThemeContextProviderNativeModule from '../../design/components/ThemeContextProvider/native/RootThemeContextProvider.native.tsx'; /* Metro dependency 10901 */ import * as ManaTypeConsolidationExperimentModule from '../design/ManaTypeConsolidationExperiment.tsx'; /* Metro dependency 13110 */ function _fun100182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:6, offset: 0x021e0717, size: 196 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/themes/RootThemeContextProvider.native.tsx'); exports.RootThemeContextProvider = RootThemeContextProvider_100183; function RootThemeContextProvider_100183({children}) { // fn#100183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:273, offset: 0x021e07db, size: 623 bytes, params: 2, frame: 24 var r1; var r12; var r11; var r8; var moduleValue4; var moduleValue5; var moduleValue6; var moduleValue7; const {saturation, contrast, theme} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AccessibilityStore, ThemeStore], function() { var accessibilityStoreBinding = AccessibilityStore; return {saturation: accessibilityStoreBinding.saturation, contrast: accessibilityStoreBinding.contrast, theme: ThemeStore.theme}; }); const value3 = (UseColorThemeBackground)(); const {enabled, chatInputFloating, chatInputLegacySendButton} = (MobileVisualRefreshExperimentModule).useMobileVisualRefreshConfig({location: 'RootThemeContextProvider'}); const value5 = (ManaTypeConsolidationExperimentModule).useManaTypeConsolidationExperiment('RootThemeContextProvider'); const value6 = value5.useMemo(_fun100185, [enabled, chatInputFloating, chatInputLegacySendButton, value5]); if (value3 != null) { if (value3.theme === ThemeTypes.LIGHT) { moduleValue5 = require(3868) /* metro dependency 3868: native */; r1 = moduleValue5.setThemeFlag(0, (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.MOBILE_LIGHT_GRADIENT_THEME_ENABLED); } else { moduleValue4 = require(3868) /* metro dependency 3868: native */; r1 = moduleValue4.setThemeFlag(0, (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.MOBILE_DARK_GRADIENT_THEME_ENABLED); } r12 = r1; } else { r12 = 0; } if (saturation === 1) { r11 = r12; } else { moduleValue6 = require(3868) /* metro dependency 3868: native */; r11 = moduleValue6.setThemeFlag(r12, (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.REDUCE_SATURATION_ENABLED); } if (contrast === 1) { r8 = r11; } else { moduleValue7 = require(3868) /* metro dependency 3868: native */; r8 = moduleValue7.setThemeFlag(r11, contrast > 1 ? (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.INCREASED_CONTRAST_ENABLED : (require(3868) /* metro dependency 3868: native */).ThemeContextFlags.REDUCED_CONTRAST_ENABLED); } const RootThemeContextProvider = (RootThemeContextProviderNativeModule).RootThemeContextProvider; return ( {children} ); function _fun100185() { // fn#100185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13299:713, offset: 0x021e0a7a, size: 116 bytes, params: 1, frame: 12 const items2 = []; if (chatInputLegacySendButton) { items2.push('mobile-visual-refresh-legacy-send-button'); } if (chatInputFloating) { items2.push('mobile-visual-refresh-floating'); } if (enabled) { items2.push('mobile-visual-refresh'); } if (ReactModule) { items2.push('mana-type-consolidation'); } return items2.length > 0 ? items2 : undefined; } } } global.__d(_fun100182, 13109, [31, 4502, 1310, 482, 33, 566, 4003, 1357, 13110, 3868, 10901, 2]) /* metro module 13109, dependencies: [31, 4502, 1310, 482, 33, 566, 4003, 1357, 13110, 3868, 10901, 2] */;