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

115 lines
3.4 KiB
TypeScript
Raw Normal View History

2026-10-07 22:43:51 +00:00
// Module ID: 17662
// Function ID: 17663
// Name: useChannelsAllowedToUnlink
2026-10-07 22:43:51 +00:00
// Dependencies: [4507, 4509, 10670, 558, 576, 504, 2]
2026-10-02 13:37:24 +00:00
// Exports: getChannelsAllowedToUnlink
2026-10-07 22:43:51 +00:00
// Module 17662 (useChannelsAllowedToUnlink)
import GuildChannelStore2 from "GuildChannelStore" /* 4507 */;
import PermissionStore from "PermissionStore" /* 4509 */;
2026-10-02 13:37:24 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const require = globalThis.__r;
2026-10-01 14:13:23 +00:00
const GuildChannelStore = GuildChannelStore2;
let _require;
2026-10-09 10:34:53 +00:00
const f131505 = (channel) => channel.channel;
2026-10-01 14:13:23 +00:00
let closure_3 = GuildChannelStore2.GUILD_SELECTABLE_CHANNELS_KEY;
2026-10-02 13:37:24 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
let first;
let tmp7;
_require = arg0;
const tmp2 = dependencyMap;
let obj = require("react");
const cResult = obj.c(3);
const tmp = _require;
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
let items = [PermissionStore, GuildChannelStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
2026-10-02 13:37:24 +00:00
if (cResult[1] !== arg0) {
const fn = function s() {
const obj = GuildChannelStore;
if (GuildChannelStore !== undefined) {
if (PermissionStore !== undefined) {
let items;
closure_0 = tmp2;
if (null == closure_0) {
items = [];
} else {
const arr = obj.getChannels(closure_0)[closure_3];
const found = arr.filter((channel) => {
const obj = closure_2_0(closure_2_1[2]);
return obj.canUnlinkLobbyChannel(channel.channel, closure_0);
});
2026-10-09 10:34:53 +00:00
items = found.map(f131505);
2026-10-02 13:37:24 +00:00
}
return items;
}
}
};
cResult[1] = arg0;
cResult[2] = fn;
tmp7 = fn;
} else {
2026-10-02 13:37:24 +00:00
tmp7 = cResult[2];
}
2026-10-02 13:37:24 +00:00
const tmpResult = tmp(504);
return tmpResult.useStateFromStoresArray(first, tmp7);
}) : ((arg0) => {
_require = arg0;
2026-10-01 14:13:23 +00:00
let obj = require("get initialized");
let items = [PermissionStore, GuildChannelStore];
2026-10-01 14:13:23 +00:00
return obj.useStateFromStoresArray(items, () => {
let obj = GuildChannelStore;
if (GuildChannelStore !== undefined) {
2026-10-01 14:13:23 +00:00
if (PermissionStore !== undefined) {
let items;
2026-10-02 13:37:24 +00:00
closure_0 = tmp2;
2026-10-01 14:13:23 +00:00
if (null == closure_0) {
items = [];
} else {
2026-10-01 14:13:23 +00:00
const arr = obj.getChannels(closure_0)[closure_3];
const found = arr.filter((channel) => {
2026-10-02 13:37:24 +00:00
const obj = closure_2_0(closure_2_1[2]);
2026-10-01 14:13:23 +00:00
return obj.canUnlinkLobbyChannel(channel.channel, closure_0);
});
2026-10-09 10:34:53 +00:00
items = found.map(f131505);
}
return items;
}
}
});
2026-10-02 13:37:24 +00:00
});
function getChannelsAllowedToUnlink(arg0) {
let items;
let obj = arg1;
if (arg1 === undefined) {
obj = GuildChannelStore;
}
let tmp = arg2;
if (arg2 === undefined) {
tmp = PermissionStore;
}
let closure_0 = tmp;
if (null == arg0) {
items = [];
} else {
const arr = obj.getChannels(arg0)[closure_3];
const found = arr.filter((channel) => {
const obj = closure_2_0(closure_2_1[2]);
return obj.canUnlinkLobbyChannel(channel.channel, closure_0);
});
2026-10-09 10:34:53 +00:00
items = found.map(f131505);
2026-10-02 13:37:24 +00:00
}
return items;
}
const result = size.fileFinishedImporting("modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx");
export { getChannelsAllowedToUnlink };
export const useChannelsAllowedToUnlink = tmp2;