/* Metro module 15310; source: modules/themes/native/useNativeThemeUpdater.tsx; dependencies: [31, 1310, 1357, 15311, 15312, 2] */ function _fun117049(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:6, offset: 0x024a1908, size: 137 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/themes/native/useNativeThemeUpdater.tsx'); exports.default = useNativeThemeUpdater; } function useNativeThemeUpdater() { // fn#117050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:207, offset: 0x024a1991, size: 122 bytes, params: 1, frame: 15 const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useNativeThemeUpdater'); const binding = env0_3; const env0_1 = binding.useRef(ThemeStore.theme); binding.useLayoutEffect(_fun117051, [value2]); binding.useLayoutEffect(function() { var closure = _fun117053; var env0_0 = closure; require(dependencyMap[4]).updateTheme(ThemeStore.theme); ThemeStore.addChangeListener(closure); return _fun117054; }, []); } function _fun117051() { // fn#117051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:318, offset: 0x024a1a0b, size: 45 bytes, params: 1, frame: 12 const value = environment.__proto__; (require(15311) /* metro dependency 15311: updateVisualRefresh */).updateVisualRefresh(env0_0); } function _fun117052() { // fn#117052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:380, offset: 0x024a1a38, size: 79 bytes, params: 1, frame: 14 const closure = handleThemeUpdate; const updateThemeModule = require(15312) /* metro dependency 15312: updateTheme */; updateThemeModule.updateTheme(ThemeStore.theme); ThemeStore.addChangeListener(closure); return function() { ThemeStore.removeChangeListener(handleThemeUpdate); }; } function handleThemeUpdate() { // fn#117053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15507:385, offset: 0x024a1a87, size: 76 bytes, params: 1, frame: 12 const value = environment.__proto__.__proto__; const theme = ThemeStore.theme; if (theme !== env1_1.current) { env1_1.current = theme; (require(15312) /* metro dependency 15312: updateTheme */).updateTheme(theme); } }