decord/source/modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx

53 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16838
// Function ID: 16839
2026-07-20 16:05:17 +00:00
// Name: getChannelsAllowedToUnlink
2026-08-24 06:08:38 +00:00
// Dependencies: [1981, 4024, 9988, 589, 2]
2026-07-29 08:29:29 +00:00
// Exports: getChannelsAllowedToUnlink, useChannelsAllowedToUnlink
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 16838 (getChannelsAllowedToUnlink)
import closure_2 from "comparator" /* 1981 */;
import { GUILD_SELECTABLE_CHANNELS_KEY as closure_3 } from "comparator" /* 1981 */;
import closure_4 from "getUncachedChannelPermissions" /* 4024 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const require = arg1;
const result = require("set").fileFinishedImporting("modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx");
2026-07-29 08:29:29 +00:00
export const getChannelsAllowedToUnlink = function getChannelsAllowedToUnlink(arg0) {
2026-07-20 16:05:17 +00:00
let obj = arg1;
if (arg1 === undefined) {
2026-08-24 06:08:38 +00:00
obj = closure_2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp = arg2;
if (arg2 === undefined) {
2026-08-24 06:08:38 +00:00
tmp = closure_4;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
closure_0 = tmp;
2026-07-20 16:05:17 +00:00
if (null == arg0) {
let items = [];
} else {
2026-08-24 06:08:38 +00:00
const found = obj.getChannels(arg0)[closure_3].filter((channel) => callback(closure_1_1[2]).canUnlinkLobbyChannel(channel.channel, callback));
2026-07-20 16:05:17 +00:00
items = found.map((channel) => channel.channel);
const arr = obj.getChannels(arg0)[closure_3];
}
return items;
2026-07-29 08:29:29 +00:00
};
2026-07-20 16:05:17 +00:00
export const useChannelsAllowedToUnlink = function useChannelsAllowedToUnlink(id) {
2026-07-23 10:11:24 +00:00
const _require = id;
2026-08-24 06:08:38 +00:00
let items = [closure_4, closure_2];
2026-07-29 08:29:29 +00:00
return _require(589).useStateFromStoresArray(items, () => {
2026-08-24 06:08:38 +00:00
if (closure_1_2 !== undefined) {
2026-07-29 08:29:29 +00:00
if (tmp2 !== undefined) {
2026-08-24 06:08:38 +00:00
closure_0 = tmp2;
2026-07-29 08:29:29 +00:00
if (null == tmp) {
let items = [];
} else {
2026-08-24 06:08:38 +00:00
const found = closure_1_2.getChannels(tmp)[closure_1_3].filter((channel) => callback(closure_1_1[2]).canUnlinkLobbyChannel(channel.channel, callback));
2026-07-29 08:29:29 +00:00
items = found.map((channel) => channel.channel);
2026-08-24 06:08:38 +00:00
const arr = closure_1_2.getChannels(tmp)[closure_1_3];
2026-07-29 08:29:29 +00:00
}
return items;
}
}
});
2026-07-20 16:05:17 +00:00
};