decord/alpha/source/modules/voice_calls/useIsVoiceChannelFull.tsx

108 lines
3.2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 11016
// Function ID: 11017
2026-07-20 16:05:17 +00:00
// Name: useIsVoiceChannelFull
2026-10-10 08:08:14 +00:00
// Dependencies: [2087, 4750, 5113, 1096, 558, 576, 504, 5414, 2]
2026-07-20 16:05:17 +00:00
2026-10-10 08:08:14 +00:00
// Module 11016 (useIsVoiceChannelFull)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1096 */;
2026-10-10 08:08:14 +00:00
import ChannelUtils from "ChannelUtils" /* 5414 */;
import GuildStore from "GuildStore" /* 2087 */;
import PermissionStore from "PermissionStore" /* 4750 */;
import VoiceStateStore from "VoiceStateStore" /* 5113 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-03 08:58:59 +00:00
const Permissions = Constants.Permissions;
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoiceChannelLocked(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let first;
let tmp6;
let tmp7;
_require = arg0;
const tmp = _require;
let tmp2 = dependencyMap;
const obj = require("react");
const cResult = obj.c(4);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [PermissionStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
2026-10-08 09:57:35 +00:00
const fn = function t() {
2026-10-03 08:58:59 +00:00
const tmp2 = null == closure_0 || !PermissionStore.can(Permissions.CONNECT, tmp);
return tmp2;
};
const items1 = [arg0];
cResult[1] = arg0;
cResult[2] = fn;
cResult[3] = items1;
tmp7 = items1;
tmp6 = fn;
} else {
tmp6 = cResult[2];
tmp7 = cResult[3];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(first, tmp6, tmp7);
2026-10-08 09:57:35 +00:00
}) : (function useIsVoiceChannelLocked(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
_require = arg0;
const items = [PermissionStore];
2026-10-03 08:58:59 +00:00
const items1 = [arg0];
const obj = require("get initialized");
return obj.useStateFromStores(items, () => {
const tmp2 = null == closure_0 || !PermissionStore.can(Permissions.CONNECT, tmp);
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}, items1);
2026-10-03 08:58:59 +00:00
});
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoiceChannelFull(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let first;
let tmp7;
_require = arg0;
let obj = require("react");
const cResult = obj.c(3);
const tmp = _require;
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [VoiceStateStore, GuildStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
2026-10-08 09:57:35 +00:00
const fn = function t() {
2026-10-03 08:58:59 +00:00
const obj = ChannelUtils;
return obj.isChannelFull(closure_0, VoiceStateStore, GuildStore);
};
cResult[1] = arg0;
cResult[2] = fn;
tmp7 = fn;
} else {
tmp7 = cResult[2];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(first, tmp7);
2026-10-08 09:57:35 +00:00
}) : (function useIsVoiceChannelFull(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
_require = arg0;
let obj = require("get initialized");
const items = [VoiceStateStore, GuildStore];
return obj.useStateFromStores(items, () => {
const obj = ChannelUtils;
return obj.isChannelFull(closure_0, VoiceStateStore, GuildStore);
});
});
const result = size.fileFinishedImporting("modules/voice_calls/useIsVoiceChannelFull.tsx");
export default tmp3;
export const useIsVoiceChannelLocked = tmp2;