decord/source/modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

52 lines
1.8 KiB
TypeScript

// Module ID: 17527
// Function ID: 17528
// Name: getChannelsAllowedToUnlink
// Dependencies: [2012, 4199, 10938, 504, 2]
// Exports: getChannelsAllowedToUnlink, useChannelsAllowedToUnlink
// Module 17527 (getChannelsAllowedToUnlink)
import closure_2 from "comparator" /* 2012 */;
import { GUILD_SELECTABLE_CHANNELS_KEY as closure_3 } from "comparator" /* 2012 */;
import closure_4 from "getUncachedChannelPermissions" /* 4199 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx");
export const getChannelsAllowedToUnlink = function getChannelsAllowedToUnlink(arg0) {
let obj = arg1;
if (arg1 === undefined) {
obj = closure_2;
}
let tmp = arg2;
if (arg2 === undefined) {
tmp = closure_4;
}
closure_0 = tmp;
if (null == arg0) {
let items = [];
} else {
const found = obj.getChannels(arg0)[closure_3].filter((channel) => callback(closure_1_1[2]).canUnlinkLobbyChannel(channel.channel, callback));
items = found.map((channel) => channel.channel);
const arr = obj.getChannels(arg0)[closure_3];
}
return items;
};
export const useChannelsAllowedToUnlink = function useChannelsAllowedToUnlink(id) {
const _require = id;
let items = [closure_4, closure_2];
return _require(504).useStateFromStoresArray(items, () => {
if (closure_1_2 !== undefined) {
if (tmp2 !== undefined) {
closure_0 = tmp2;
if (null == tmp) {
let items = [];
} else {
const found = closure_1_2.getChannels(tmp)[closure_1_3].filter((channel) => callback(closure_1_1[2]).canUnlinkLobbyChannel(channel.channel, callback));
items = found.map((channel) => channel.channel);
const arr = closure_1_2.getChannels(tmp)[closure_1_3];
}
return items;
}
}
});
};