decord/alpha/source/modules/voice_panel/VoicePanelUtils.native.tsx

137 lines
4.4 KiB
TypeScript
Raw Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 11026
// Function ID: 11027
// Name: VoicePanelUtils
2026-10-10 08:08:14 +00:00
// Dependencies: [2065, 5110, 6074, 558, 576, 573, 2]
2026-07-20 16:05:17 +00:00
2026-10-10 08:08:14 +00:00
// Module 11026 (VoicePanelUtils)
2026-10-03 08:58:59 +00:00
import react from "react" /* 576 */;
2026-10-10 08:08:14 +00:00
import ChannelStore from "ChannelStore" /* 2065 */;
import RTCConnectionStore from "RTCConnectionStore" /* 5110 */;
import VoicePanelStore from "VoicePanelStore" /* 6074 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
let channel;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
let tmp;
const useStateFromStores = tmp(573);
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoicePanelShowing() {
2026-10-03 08:58:59 +00:00
let channelId;
let tmp4;
let tmp5;
let tmp = require;
const obj = react;
const cResult = obj.c(2);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [ChannelStore, RTCConnectionStore];
2026-10-08 09:57:35 +00:00
const fn = function s() {
2026-10-03 08:58:59 +00:00
channel = channel.getChannel(channelId.getChannelId());
const tmp = null != channel && !channel.isGuildStageVoice();
return tmp;
};
cResult[0] = items;
cResult[1] = fn;
tmp4 = items;
tmp5 = fn;
} else {
[tmp4, tmp5] = cResult;
}
const tmpResult = useStateFromStores;
return tmpResult.useStateFromStores(tmp4, tmp5);
2026-10-08 09:57:35 +00:00
}) : (function useIsVoicePanelShowing() {
2026-10-03 08:58:59 +00:00
let channelId;
const items = [ChannelStore, RTCConnectionStore];
2026-10-03 08:58:59 +00:00
const obj = useStateFromStores;
return obj.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
channel = channel.getChannel(channelId.getChannelId());
2026-10-03 08:58:59 +00:00
const tmp = null != channel && !channel.isGuildStageVoice();
return tmp;
2026-07-20 16:05:17 +00:00
});
2026-10-03 08:58:59 +00:00
});
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoicePanelFullscreen() {
2026-10-03 08:58:59 +00:00
let first;
const obj = react;
const cResult = obj.c(1);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const fn = function n(isVoicePanelFullscreen) {
return isVoicePanelFullscreen.isVoicePanelFullscreen();
};
cResult[0] = fn;
first = fn;
} else {
first = cResult[0];
}
return VoicePanelStore(first);
2026-10-08 09:57:35 +00:00
}) : (function useIsVoicePanelFullscreen() {
return VoicePanelStore((isVoicePanelFullscreen) => isVoicePanelFullscreen.isVoicePanelFullscreen());
});
2026-10-03 08:58:59 +00:00
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp4 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoicePanelOpen(arg0) {
2026-10-03 08:58:59 +00:00
let tmp2;
let closure_0 = arg0;
const obj = react;
const cResult = obj.c(2);
if (cResult[0] !== arg0) {
2026-10-08 09:57:35 +00:00
const fn = function l(isChannelOpen) {
2026-10-03 08:58:59 +00:00
return isChannelOpen.isChannelOpen(closure_0);
};
cResult[0] = arg0;
cResult[1] = fn;
tmp2 = fn;
} else {
tmp2 = cResult[1];
}
return VoicePanelStore(tmp2);
2026-10-08 09:57:35 +00:00
}) : (function useIsVoicePanelOpen(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0 = arg0;
return VoicePanelStore((isChannelOpen) => isChannelOpen.isChannelOpen(closure_0));
2026-10-03 08:58:59 +00:00
});
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp5 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsAnyVoicePanelOpen() {
2026-10-03 08:58:59 +00:00
let first;
const obj = react;
const cResult = obj.c(1);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const fn = function n(isAnyVoicePanelOpen) {
return isAnyVoicePanelOpen.isAnyVoicePanelOpen();
};
cResult[0] = fn;
first = fn;
} else {
first = cResult[0];
}
return VoicePanelStore(first);
2026-10-08 09:57:35 +00:00
}) : (function useIsAnyVoicePanelOpen() {
return VoicePanelStore((isAnyVoicePanelOpen) => isAnyVoicePanelOpen.isAnyVoicePanelOpen());
});
2026-10-03 08:58:59 +00:00
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp6 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoicePanelMounted(arg0) {
2026-10-03 08:58:59 +00:00
let tmp2;
let closure_0 = arg0;
const obj = react;
const cResult = obj.c(2);
if (cResult[0] !== arg0) {
2026-10-08 09:57:35 +00:00
const fn = function l(isMounted) {
2026-10-03 08:58:59 +00:00
return isMounted.isMounted(closure_0);
};
cResult[0] = arg0;
cResult[1] = fn;
tmp2 = fn;
} else {
tmp2 = cResult[1];
}
return VoicePanelStore(tmp2);
2026-10-08 09:57:35 +00:00
}) : (function useIsVoicePanelMounted(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0 = arg0;
return VoicePanelStore((isMounted) => isMounted.isMounted(closure_0));
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/voice_panel/VoicePanelUtils.native.tsx");
export const useIsVoicePanelShowing = tmp2;
export const useIsVoicePanelFullscreen = tmp3;
export const useIsVoicePanelOpen = tmp4;
export const useIsAnyVoicePanelOpen = tmp5;
export const useIsVoicePanelMounted = tmp6;