/* Metro module 15354; source: modules/external_pip/useExternalPipEnabler.android.tsx; dependencies: [4606, 1226, 4294, 566, 15355, 2] */ function _fun117370(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:6, offset: 0x024b0841, size: 146 bytes, params: 8, frame: 19 let env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */; const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */; const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/external_pip/useExternalPipEnabler.android.tsx'); exports.default = function({disabled}) { var env0_0 = disabled; return require(dependencyMap[3]).useStateFromStoresObject([ChannelRTCStore, RTCConnectionStore, AuthenticationStore], _fun117372, [disabled]); }; } function useExternalPIPEnabler({disabled}) { // fn#117371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:224, offset: 0x024b08d3, size: 97 bytes, params: 2, frame: 17 return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelRTCStore, RTCConnectionStore, AuthenticationStore], _fun117372, [disabled]); } function _fun117372() { // fn#117372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:318, offset: 0x024b0934, size: 219 bytes, params: 1, frame: 16 var r3; var r6; var streamParticipants; var value7; const channelId = RTCConnectionStore.getChannelId(); if (channelId == null) { return (require(15355) /* metro dependency 15355: ExternalPipEnablerState */).DEFAULT_STATE; } if (disabled) { return (require(15355) /* metro dependency 15355: ExternalPipEnablerState */).DEFAULT_STATE; } const videoParticipants = ChannelRTCStore.getVideoParticipants(channelId); const value5 = videoParticipants.filter(function(a0) { return !a0.localVideoDisabled; }).length > 0; if (value5) { r3 = value5; r6 = channelId; } else { streamParticipants = ChannelRTCStore.getStreamParticipants(channelId); value7 = streamParticipants.filter(function(a0) { return a0.user.id !== AuthenticationStore.getId(); }); r3 = value7.find(_fun117375) != null; r6 = streamParticipants; } const object2 = {}; const DEFAULT_STATE = (require(15355) /* metro dependency 15355: ExternalPipEnablerState */).DEFAULT_STATE; copyDataProperties(object2, DEFAULT_STATE, r6); object2['externalPipEnabled'] = r3; return object2; } function _fun117375({streamId}) { // fn#117375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15551:540, offset: 0x024b0a41, size: 17 bytes, params: 2, frame: 2 return streamId != null; }