// Module ID: 17631 // Function ID: 17632 // Name: VoicePanelManager // Dependencies: [2051, 4860, 5045, 6540, 2] // Module 17631 (VoicePanelManager) import ChannelStore from "ChannelStore" /* 2051 */; import RTCConnectionStore from "RTCConnectionStore" /* 4860 */; import VoicePanelStore from "VoicePanelStore" /* 5045 */; import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 6540 */; import size from "module_2" /* 2 */; class VoicePanelManager extends AutomaticLifecycleManager { constructor() { const applyArgumentsResult = HermesBuiltin.applyArguments(this, new.target); applyArgumentsResult.actions = { VOICE_CHANNEL_SELECT() { const channelId = RTCConnectionStore.getChannelId(); if (null != channelId) { const state = VoicePanelStore.getState(); const channel = ChannelStore.getChannel(channelId); let isGuildStageVoiceResult; if (channel != null) { isGuildStageVoiceResult = channel.isGuildStageVoice(); } if (isGuildStageVoiceResult) { state.closeChannel(channelId); } else { const channels = state.channels; if (!channels.has(channelId)) { state.openChannel(channelId); } } } }, RTC_CONNECTION_STATE() { const channelId = RTCConnectionStore.getChannelId(); if (null != channelId) { const state = VoicePanelStore.getState(); const channel = ChannelStore.getChannel(channelId); let isGuildStageVoiceResult; if (channel != null) { isGuildStageVoiceResult = channel.isGuildStageVoice(); } if (isGuildStageVoiceResult) { state.closeChannel(channelId); } else { const channels = state.channels; if (!channels.has(channelId)) { state.openChannel(channelId); } } } } }; return applyArgumentsResult; } } const voicePanelManager = new VoicePanelManager(); const result = size.fileFinishedImporting("modules/voice_panel/VoicePanelManager.native.tsx"); export default voicePanelManager;