2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 9811
|
|
|
|
|
// Function ID: 9812
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: VoicePanelUtils
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [1957, 4659, 4844, 4845, 563, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: isVoicePanelEnabled, useIsAnyVoicePanelOpen, useIsVoicePanelFullscreen, useIsVoicePanelMounted, useIsVoicePanelOpen, useIsVoicePanelShowing
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 9811 (VoicePanelUtils)
|
2026-09-10 05:38:07 +00:00
|
|
|
import useStateFromStores from "useStateFromStores" /* 563 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import StageVoicePanelExperiment from "StageVoicePanelExperiment" /* 4845 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 1957 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import RTCConnectionStore from "RTCConnectionStore" /* 4659 */;
|
|
|
|
|
import VoicePanelStore from "VoicePanelStore" /* 4844 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
let result = size.fileFinishedImporting("modules/voice_panel/VoicePanelUtils.native.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const isVoicePanelEnabled = function isVoicePanelEnabled(channel2) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = StageVoicePanelExperiment.isStageVoicePanelEnabled("voice_panel_utils");
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp2 = !result;
|
|
|
|
|
if (!result) {
|
2026-07-20 16:05:17 +00:00
|
|
|
let isGuildStageVoiceResult;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (channel2 != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
isGuildStageVoiceResult = channel2.isGuildStageVoice();
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp2 = isGuildStageVoiceResult;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return !tmp2;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const useIsVoicePanelShowing = function useIsVoicePanelShowing() {
|
2026-09-10 05:38:07 +00:00
|
|
|
const items = [ChannelStore, RTCConnectionStore];
|
|
|
|
|
return useStateFromStores.useStateFromStores(items, () => {
|
2026-07-29 08:29:29 +00:00
|
|
|
channel = channel.getChannel(channelId.getChannelId());
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp = null != channel;
|
|
|
|
|
if (tmp) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const isGuildStageVoiceResult = channel.isGuildStageVoice();
|
|
|
|
|
let result = !isGuildStageVoiceResult;
|
|
|
|
|
if (isGuildStageVoiceResult) {
|
2026-09-10 05:38:07 +00:00
|
|
|
result = StageVoicePanelExperiment.isStageVoicePanelEnabled("voice_panel_utils");
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
tmp = result;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
export const useIsVoicePanelFullscreen = function useIsVoicePanelFullscreen() {
|
2026-09-10 05:38:07 +00:00
|
|
|
return VoicePanelStore((isVoicePanelFullscreen) => isVoicePanelFullscreen.isVoicePanelFullscreen());
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const useIsVoicePanelOpen = function useIsVoicePanelOpen(channelId) {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = channelId;
|
2026-09-10 05:38:07 +00:00
|
|
|
return VoicePanelStore((isChannelOpen) => isChannelOpen.isChannelOpen(closure_0));
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const useIsAnyVoicePanelOpen = function useIsAnyVoicePanelOpen() {
|
2026-09-10 05:38:07 +00:00
|
|
|
return VoicePanelStore((isAnyVoicePanelOpen) => isAnyVoicePanelOpen.isAnyVoicePanelOpen());
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const useIsVoicePanelMounted = function useIsVoicePanelMounted(channelId) {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = channelId;
|
2026-09-10 05:38:07 +00:00
|
|
|
return VoicePanelStore((isMounted) => isMounted.isMounted(closure_0));
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|