/* Metro module 15448; source: modules/voice_panel/native/VoicePanelSystemUIManager.tsx; dependencies: [57, 31, 4606, 11795, 11793, 4299, 33, 11794, 690, 477, 6949, 4017, 7739, 7725, 7727, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */ import Module06949 from '../../../by-id/module-06949.js'; /* Metro dependency 6949 */ import VoicePanelStateContext from './VoicePanelStateContext.tsx'; /* Metro dependency 11794 */ 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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */ import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */ import * as CheapWorkletShallowEqualModule from '../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */ import * as VoicePanelControlsConstantsModule from './controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */ import * as VoicePanelConstantsModule from '../VoicePanelConstants.tsx'; /* Metro dependency 11795 */ function _fun118240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:6, offset: 0x024d2865, size: 301 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; object = {code: 'function VoicePanelSystemUIManagerTsx1(){const{focused,mode,controlsSpecs,windowDimensions}=this.__closure;var _focused$get;return{focusedId:(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id,mode:mode.get(),controlsMode:controlsSpecs.get().mode,landscape:windowDimensions.get().landscape};}'}; object = {code: 'function VoicePanelSystemUIManagerTsx2(props,previous){const{cheapWorkletShallowEqual,runOnJS,handleStateChange}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;runOnJS(handleStateChange)(props);}'}; value = value.memo(VoicePanelSystemUIManager); (FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/VoicePanelSystemUIManager.tsx'); exports.default = value; function VoicePanelSystemUIManager() { // fn#118241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15645:872, offset: 0x024d2992, size: 597 bytes, params: 1, frame: 28 const binding = env0_4; const value2 = binding.useContext(VoicePanelStateContext); const focused = value2.focused; const channelId = value2.channelId; const mode = value2.mode; const controlsSpecs = value2.controlsSpecs; const controlsSpecs2 = controlsSpecs; const windowDimensions = value2.windowDimensions; let useState = binding.useState; const value3 = Reflect.apply(useState, binding, [true]); const binding2 = controlsSpecs2; const value4 = binding2(value3, 2); const property = value4[0]; const env0_5 = value4[1]; useState = binding.useState; const value5 = binding2(Reflect.apply(useState, binding, [true]), 2); const property2 = value5[0]; const env0_6 = value5[1]; useState = binding.useState; const value6 = binding2(Reflect.apply(useState, binding, [false]), 2); const property3 = value6[0]; const env0_7 = value6[1]; useState = binding.useState; const value7 = binding2(Reflect.apply(useState, binding, [false]), 2); const property4 = value7[0]; const env0_8 = value7[1]; const {cancelPendingDebounce, handleStateChange} = binding.useMemo(_fun118242, [channelId]); binding.useEffect(function() { return _fun118248; }, [cancelPendingDebounce]); const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction; const closure = function() { var object = {}; object.focusedId = focused.get()?.id; object.mode = mode.get(); object.controlsMode = controlsSpecs.get().mode; object.landscape = windowDimensions.get().landscape; return object; }; closure.__closure = {focused: focused, mode: mode, controlsSpecs: controlsSpecs, windowDimensions: windowDimensions}; closure.__workletHash = 2478376475717; closure.__initData = env0_12; const VoicePanelSystemUIManagerU2 = VoicePanelSystemUIManagerU; VoicePanelSystemUIManagerU2.__closure = {cheapWorkletShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual, runOnJS: ReanimatedRexportModule.runOnJS, handleStateChange: handleStateChange}; VoicePanelSystemUIManagerU2.__workletHash = 3592680244658; VoicePanelSystemUIManagerU2.__initData = env0_13; Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, VoicePanelSystemUIManagerU2]); return ( <> { property2 ? ((Component) =>