2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 9988
|
|
|
|
|
// Function ID: 9989
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: canUnlinkLobbyChannel
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [4024, 676, 589, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: canUnlinkLobbyChannel, useCanUnlinkLobbyChannel
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 9988 (canUnlinkLobbyChannel)
|
|
|
|
|
import closure_2 from "getUncachedChannelPermissions" /* 4024 */;
|
|
|
|
|
import { Permissions } from "ME" /* 676 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = require("set").fileFinishedImporting("modules/lobbies/LobbyUtils.tsx");
|
2026-07-29 08:29:29 +00:00
|
|
|
|
|
|
|
|
export const canUnlinkLobbyChannel = function canUnlinkLobbyChannel(channel, closure_0) {
|
2026-07-23 10:11:24 +00:00
|
|
|
let obj = closure_0;
|
|
|
|
|
if (closure_0 === undefined) {
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = closure_2;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
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;
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export const useCanUnlinkLobbyChannel = function useCanUnlinkLobbyChannel(channel) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const _require = channel;
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_2];
|
2026-07-29 08:29:29 +00:00
|
|
|
return _require(589).useStateFromStores(items, () => {
|
2026-08-24 06:08:38 +00:00
|
|
|
if (closure_1_2 !== undefined) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp3 = null != tmp;
|
|
|
|
|
if (tmp3) {
|
|
|
|
|
let canResult = null != tmp.linkedLobby;
|
|
|
|
|
if (canResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
canResult = obj.can(closure_1_3.MANAGE_CHANNELS, tmp);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
if (canResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
canResult = obj.can(closure_1_3.VIEW_CHANNEL, tmp);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
if (canResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
canResult = obj.can(closure_1_3.SEND_MESSAGES, tmp);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
tmp3 = canResult;
|
|
|
|
|
}
|
|
|
|
|
return tmp3;
|
|
|
|
|
}
|
|
|
|
|
});
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|