decord/source/modules/lobbies/LobbyUtils.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

57 lines
1.7 KiB
TypeScript

// Module ID: 10864
// Function ID: 10865
// Name: canUnlinkLobbyChannel
// Dependencies: [4120, 673, 586, 2]
// Exports: canUnlinkLobbyChannel, useCanUnlinkLobbyChannel
// Module 10864 (canUnlinkLobbyChannel)
import closure_2 from "getUncachedChannelPermissions" /* 4120 */;
import { Permissions } from "ME" /* 673 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/lobbies/LobbyUtils.tsx");
export const canUnlinkLobbyChannel = function canUnlinkLobbyChannel(channel, closure_0) {
let obj = closure_0;
if (closure_0 === undefined) {
obj = closure_2;
}
let tmp = null != channel;
if (tmp) {
let canResult = null != channel.linkedLobby;
if (canResult) {
canResult = obj.can(Permissions.MANAGE_CHANNELS, channel);
}
if (canResult) {
canResult = obj.can(Permissions.VIEW_CHANNEL, channel);
}
if (canResult) {
canResult = obj.can(Permissions.SEND_MESSAGES, channel);
}
tmp = canResult;
}
return tmp;
};
export const useCanUnlinkLobbyChannel = function useCanUnlinkLobbyChannel(channel) {
const _require = channel;
const items = [closure_2];
return _require(586).useStateFromStores(items, () => {
if (closure_1_2 !== undefined) {
let tmp3 = null != tmp;
if (tmp3) {
let canResult = null != tmp.linkedLobby;
if (canResult) {
canResult = obj.can(closure_1_3.MANAGE_CHANNELS, tmp);
}
if (canResult) {
canResult = obj.can(closure_1_3.VIEW_CHANNEL, tmp);
}
if (canResult) {
canResult = obj.can(closure_1_3.SEND_MESSAGES, tmp);
}
tmp3 = canResult;
}
return tmp3;
}
});
};