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

53 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 16358
// Function ID: 16359
2026-07-20 16:05:17 +00:00
// Name: getChannelsAllowedToUnlink
2026-07-29 08:29:29 +00:00
// Dependencies: [1932, 3817, 10192, 589, 2]
// Exports: getChannelsAllowedToUnlink, useChannelsAllowedToUnlink
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 16358 (getChannelsAllowedToUnlink)
import comparator from "comparator";
import { GUILD_SELECTABLE_CHANNELS_KEY as closure_3 } from "comparator";
import getUncachedChannelPermissions from "getUncachedChannelPermissions";
2026-07-23 10:11:24 +00:00
let require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("canUnlinkLobbyChannel").fileFinishedImporting("modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx");
export const getChannelsAllowedToUnlink = function getChannelsAllowedToUnlink(arg0) {
2026-07-20 16:05:17 +00:00
let obj = arg1;
if (arg1 === undefined) {
2026-07-29 08:29:29 +00:00
obj = comparator;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp = arg2;
if (arg2 === undefined) {
tmp = getUncachedChannelPermissions;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const require = tmp;
2026-07-20 16:05:17 +00:00
if (null == arg0) {
let items = [];
} else {
2026-07-29 08:29:29 +00:00
const found = obj.getChannels(arg0)[closure_3].filter((channel) => tmp2(outer1_1[2]).canUnlinkLobbyChannel(channel.channel, tmp2));
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-07-29 08:29:29 +00:00
let items = [getUncachedChannelPermissions, comparator];
return _require(589).useStateFromStoresArray(items, () => {
if (outer1_2 !== undefined) {
if (tmp2 !== undefined) {
let closure_0 = tmp2;
if (null == tmp) {
let items = [];
} else {
const found = outer1_2.getChannels(tmp)[outer1_3].filter((channel) => tmp2(outer1_1[2]).canUnlinkLobbyChannel(channel.channel, tmp2));
items = found.map((channel) => channel.channel);
const arr = outer1_2.getChannels(tmp)[outer1_3];
}
return items;
}
}
});
2026-07-20 16:05:17 +00:00
};