decord/source/modules/calls/useCanSetVoiceChannelStatus.tsx

77 lines
2.4 KiB
TypeScript
Raw Normal View History

// Module ID: 17207
// Function ID: 17208
// Name: useCanSetVoiceChannelStatus
// Dependencies: [4243, 1085, 4248, 504, 2]
2026-07-29 08:29:29 +00:00
// Exports: _canSetVoiceChannelStatus, canSetVoiceChannelStatus, default
2026-07-20 16:05:17 +00:00
// Module 17207 (useCanSetVoiceChannelStatus)
import PermissionStore from "PermissionStore" /* 4243 */;
2026-07-20 16:05:17 +00:00
const require = globalThis.__r;
const require = fn;
const Permissions = fn(1085).Permissions;
2026-07-23 10:11:24 +00:00
let items = [, , ];
2026-07-20 16:05:17 +00:00
({ SET_VOICE_CHANNEL_STATUS: arr[0], CONNECT: arr[1], VIEW_CHANNEL: arr[2] } = Permissions);
2026-07-23 10:11:24 +00:00
let items1 = [Permissions.SET_VOICE_CHANNEL_STATUS];
const size = fn(2);
const result = size.fileFinishedImporting("modules/calls/useCanSetVoiceChannelStatus.tsx");
2026-07-20 16:05:17 +00:00
export default function useCanSetVoiceChannelStatus(arg0) {
_require = arg0;
2026-07-29 08:29:29 +00:00
let flag = arg1;
2026-07-20 16:05:17 +00:00
if (arg1 === undefined) {
flag = false;
}
2026-08-24 06:08:38 +00:00
dependencyMap = arg2;
items = [PermissionStore];
2026-08-24 06:08:38 +00:00
items1 = [arg0, flag, arg2];
return require("initialize").useStateFromStores(items, () => {
closure_1 = PermissionStore;
return flag ? items1 : items.every((permission) => {
if (null == dependencyMap) {
let canResult = closure_1.can(permission, context);
2026-07-29 08:29:29 +00:00
} else {
const obj2 = { permission, user: tmp, context };
canResult = flag(dependencyMap[2]).can(obj2);
const obj = flag(dependencyMap[2]);
2026-07-29 08:29:29 +00:00
}
return canResult;
});
}, items1);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
export const _canSetVoiceChannelStatus = function _canSetVoiceChannelStatus(arg0, arg1, arg2, arg3) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = arg1;
closure_2 = arg3;
return arg2 ? items1 : items.every((permission) => {
if (null == dependencyMap) {
let canResult = closure_1.can(permission, context);
2026-07-29 08:29:29 +00:00
} else {
const obj2 = { permission, user: tmp, context };
canResult = flag(dependencyMap[2]).can(obj2);
const obj = flag(dependencyMap[2]);
2026-07-29 08:29:29 +00:00
}
return canResult;
});
};
export const canSetVoiceChannelStatus = function canSetVoiceChannelStatus(arg0) {
let flag = arg1;
if (arg1 === undefined) {
2026-07-20 16:05:17 +00:00
flag = false;
}
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = PermissionStore;
2026-08-24 06:08:38 +00:00
closure_2 = arg2;
return flag ? items1 : items.every((permission) => {
if (null == dependencyMap) {
let canResult = closure_1.can(permission, context);
2026-07-29 08:29:29 +00:00
} else {
const obj2 = { permission, user: tmp, context };
canResult = flag(dependencyMap[2]).can(obj2);
const obj = flag(dependencyMap[2]);
2026-07-29 08:29:29 +00:00
}
return canResult;
});
2026-07-20 16:05:17 +00:00
};