107 lines
3.2 KiB
TypeScript
107 lines
3.2 KiB
TypeScript
// Module ID: 11016
|
|
// Function ID: 11017
|
|
// Name: useIsVoiceChannelFull
|
|
// Dependencies: [2087, 4750, 5113, 1096, 558, 576, 504, 5414, 2]
|
|
|
|
// Module 11016 (useIsVoiceChannelFull)
|
|
import Constants from "Constants" /* 1096 */;
|
|
import ChannelUtils from "ChannelUtils" /* 5414 */;
|
|
import GuildStore from "GuildStore" /* 2087 */;
|
|
import PermissionStore from "PermissionStore" /* 4750 */;
|
|
import VoiceStateStore from "VoiceStateStore" /* 5113 */;
|
|
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const require = globalThis.__r;
|
|
let _require;
|
|
|
|
const Permissions = Constants.Permissions;
|
|
let ReactCompilerGating = ReactCompilerGating_mod;
|
|
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoiceChannelLocked(arg0) {
|
|
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) {
|
|
const fn = function t() {
|
|
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);
|
|
}) : (function useIsVoiceChannelLocked(arg0) {
|
|
let closure_0;
|
|
_require = arg0;
|
|
const items = [PermissionStore];
|
|
const items1 = [arg0];
|
|
const obj = require("get initialized");
|
|
return obj.useStateFromStores(items, () => {
|
|
const tmp2 = null == closure_0 || !PermissionStore.can(Permissions.CONNECT, tmp);
|
|
return tmp2;
|
|
}, items1);
|
|
});
|
|
ReactCompilerGating = ReactCompilerGating_mod;
|
|
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsVoiceChannelFull(arg0) {
|
|
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) {
|
|
const fn = function t() {
|
|
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);
|
|
}) : (function useIsVoiceChannelFull(arg0) {
|
|
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;
|