decord/source/modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

55 lines
1.9 KiB
TypeScript

// Module ID: 17638
// Function ID: 17639
// Name: useChannelsAllowedToUnlink
// Dependencies: [2012, 4275, 11064, 504, 2]
// Exports: getChannelsAllowedToUnlink, useChannelsAllowedToUnlink
// Module 17638 (useChannelsAllowedToUnlink)
import GuildChannelStore from "GuildChannelStore" /* 2012 */;
import PermissionStore from "PermissionStore" /* 4275 */;
const require = globalThis.__r;
const require = fn;
let closure_3 = fn(2012).GUILD_SELECTABLE_CHANNELS_KEY;
const size = fn(2);
const result = size.fileFinishedImporting("modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx");
export const getChannelsAllowedToUnlink = function getChannelsAllowedToUnlink(arg0) {
let obj = arg1;
if (arg1 === undefined) {
obj = GuildChannelStore;
}
let tmp = arg2;
if (arg2 === undefined) {
tmp = PermissionStore;
}
closure_0 = tmp;
if (null == arg0) {
let items = [];
} else {
const found = obj.getChannels(arg0)[closure_3].filter((channel) => closure_0(dependencyMap[2]).canUnlinkLobbyChannel(channel.channel, closure_0));
items = found.map((channel) => channel.channel);
const arr = obj.getChannels(arg0)[closure_3];
}
return items;
};
export const useChannelsAllowedToUnlink = function useChannelsAllowedToUnlink(id) {
_require = id;
let items = [PermissionStore, GuildChannelStore];
return require("initialize").useStateFromStoresArray(items, () => {
if (GuildChannelStore !== undefined) {
if (tmp2 !== undefined) {
closure_0 = tmp2;
if (null == tmp) {
let items = [];
} else {
const found = GuildChannelStore.getChannels(tmp)[closure_3].filter((channel) => closure_0(dependencyMap[2]).canUnlinkLobbyChannel(channel.channel, closure_0));
items = found.map((channel) => channel.channel);
const arr = GuildChannelStore.getChannels(tmp)[closure_3];
}
return items;
}
}
});
};