// Module ID: 8704 // Function ID: 8705 // Name: isVoicePanelEnabled // Dependencies: [1391, 4544, 8701, 8702, 647, 2] // Exports: isVoicePanelEnabled, useIsAnyVoicePanelOpen, useIsVoicePanelFullscreen, useIsVoicePanelMounted, useIsVoicePanelOpen, useIsVoicePanelShowing // Module 8704 (isVoicePanelEnabled) import defaultAreStatesEqual from "defaultAreStatesEqual" /* 647 */; import useIsStageVoicePanelEnabled from "useIsStageVoicePanelEnabled" /* 8702 */; import closure_2 from "ensureGuildLoaded" /* 1391 */; import closure_3 from "createRTCConnection" /* 4544 */; import closure_4 from "withEqualityFn" /* 8701 */; require = arg1; let result = require("set").fileFinishedImporting("modules/voice_panel/VoicePanelUtils.native.tsx"); export const isVoicePanelEnabled = function isVoicePanelEnabled(channel2) { const result = useIsStageVoicePanelEnabled.isStageVoicePanelEnabled("voice_panel_utils"); let tmp2 = !result; if (!result) { let isGuildStageVoiceResult; if (channel2 != null) { isGuildStageVoiceResult = channel2.isGuildStageVoice(); } tmp2 = isGuildStageVoiceResult; } return !tmp2; }; export const useIsVoicePanelShowing = function useIsVoicePanelShowing() { const items = [closure_2, closure_3]; return defaultAreStatesEqual.useStateFromStores(items, () => { channel = channel.getChannel(channelId.getChannelId()); let tmp = null != channel; if (tmp) { const isGuildStageVoiceResult = channel.isGuildStageVoice(); let result = !isGuildStageVoiceResult; if (isGuildStageVoiceResult) { result = callback(table[3]).isStageVoicePanelEnabled("voice_panel_utils"); const obj2 = callback(table[3]); } tmp = result; } return tmp; }); }; export const useIsVoicePanelFullscreen = function useIsVoicePanelFullscreen() { return callback((isVoicePanelFullscreen) => isVoicePanelFullscreen.isVoicePanelFullscreen()); }; export const useIsVoicePanelOpen = function useIsVoicePanelOpen(channelId) { closure_0 = channelId; return callback((isChannelOpen) => isChannelOpen.isChannelOpen(closure_0)); }; export const useIsAnyVoicePanelOpen = function useIsAnyVoicePanelOpen() { return callback((isAnyVoicePanelOpen) => isAnyVoicePanelOpen.isAnyVoicePanelOpen()); }; export const useIsVoicePanelMounted = function useIsVoicePanelMounted(channelId) { closure_0 = channelId; return callback((isMounted) => isMounted.isMounted(closure_0)); };