decord/source/modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

55 lines
1.9 KiB
TypeScript

// Module ID: 17733
// Function ID: 17734
// Name: useChannelsAllowedToUnlink
// Dependencies: [2013, 4276, 11082, 504, 2]
// Exports: getChannelsAllowedToUnlink, useChannelsAllowedToUnlink
// Module 17733 (useChannelsAllowedToUnlink)
import GuildChannelStore from "GuildChannelStore" /* 2013 */;
import PermissionStore from "PermissionStore" /* 4276 */;
const require = globalThis.__r;
const require = fn;
let closure_3 = fn(2013).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;
}
}
});
};