decord/beta/source/modules/voice_chat/VoiceChatHooks.tsx

66 lines
2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 10358
// Function ID: 10359
// Name: VoiceChatHooks
2026-10-12 16:32:48 +00:00
// Dependencies: [502, 5113, 558, 576, 504, 2]
2026-10-02 13:37:24 +00:00
// Exports: useIsConnectedToVoiceChannel
2026-10-12 16:32:48 +00:00
// Module 10358 (VoiceChatHooks)
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-12 16:32:48 +00:00
import VoiceStateStore from "VoiceStateStore" /* 5113 */;
2026-10-02 13:37:24 +00:00
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const require = globalThis.__r;
2026-10-01 14:13:23 +00:00
let _require;
2026-10-02 13:37:24 +00:00
let ReactCompilerGating = ReactCompilerGating_mod;
ReactCompilerGating.isReactCompilerEnabled();
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-12 16:32:48 +00:00
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsConnectedToVoiceChannelForId(arg0) {
2026-10-02 13:37:24 +00:00
let closure_0;
let first;
let tmp7;
_require = arg0;
const obj = require("react");
const cResult = obj.c(3);
const tmp = _require;
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [VoiceStateStore, AuthenticationStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
2026-10-02 13:37:24 +00:00
if (cResult[1] !== arg0) {
const fn = function c() {
return VoiceStateStore.isInChannel(closure_0, AuthenticationStore.getId());
};
cResult[1] = arg0;
cResult[2] = fn;
tmp7 = fn;
} else {
tmp7 = cResult[2];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(first, tmp7);
2026-10-12 16:32:48 +00:00
}) : (function useIsConnectedToVoiceChannelForId(arg0) {
2026-10-01 14:13:23 +00:00
let closure_0;
_require = arg0;
const items = [VoiceStateStore, AuthenticationStore];
2026-10-01 14:13:23 +00:00
const obj = require("get initialized");
2026-10-02 13:37:24 +00:00
return obj.useStateFromStores(items, () => VoiceStateStore.isInChannel(closure_0, AuthenticationStore.getId()));
});
let closure_4 = tmp3;
2026-10-12 16:32:48 +00:00
function useIsConnectedToVoiceChannel(id) {
2026-10-02 13:37:24 +00:00
id = undefined;
const tmp = closure_4;
if (id != null) {
id = id.id;
}
return tmp(id);
2026-10-12 16:32:48 +00:00
}
2026-10-02 13:37:24 +00:00
const result1 = size.fileFinishedImporting("modules/voice_chat/VoiceChatHooks.tsx");
2026-10-12 16:32:48 +00:00
export { useIsConnectedToVoiceChannel };
2026-10-02 13:37:24 +00:00
export const useIsConnectedToVoiceChannelForId = tmp3;