This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
// Metro module 10192 (f10193).
import PermissionStore from "../../stores/PermissionStore";
import { Permissions } from "../../Constants";
import { useStateFromStores } from "../../_bundle/Module589";
export function canUnlinkLobbyChannel(a0, r6 = PermissionStore) {
return a0 != null && (a0.linkedLobby != null && r6.can(Permissions.MANAGE_CHANNELS, a0) && r6.can(Permissions.VIEW_CHANNEL, a0) && r6.can(Permissions.SEND_MESSAGES, a0));
}
export function useCanUnlinkLobbyChannel(c17757_0) {
return useStateFromStores([PermissionStore], () => {
if (PermissionStore !== void 0) {
return c17757_0 != null && (c17757_0.linkedLobby != null && PermissionStore.can(Permissions.MANAGE_CHANNELS, c17757_0) && PermissionStore.can(Permissions.VIEW_CHANNEL, c17757_0) && PermissionStore.can(Permissions.SEND_MESSAGES, c17757_0));
}
});
}
@@ -0,0 +1,35 @@
// Metro module 16358 (f16359).
import GuildChannelStore, { GUILD_SELECTABLE_CHANNELS_KEY } from "../../../stores/GuildChannelStore";
import PermissionStore from "../../../stores/PermissionStore";
import { useStateFromStoresArray } from "../../../_bundle/Module589";
function $mk99349($env) {
return (a0) => {
const r1 = $env.$parent;
return (0, r1[0])(r1[1][2]).canUnlinkLobbyChannel(a0.channel, $env[0]);
};
}
function $mk99350() {
return (a0) => a0.channel;
}
let env11772 = {};
export function getChannelsAllowedToUnlink(a0, r6 = GuildChannelStore, r4 = PermissionStore) {
let env23002;
const r2 = env23002 = {
$parent: env11772
};
env23002[0] = r4;
return a0 == null ? [] : r6.getChannels(a0)[GUILD_SELECTABLE_CHANNELS_KEY].filter($mk99349(r2)).map($mk99350());
}
export function useChannelsAllowedToUnlink(c23003_0) {
return useStateFromStoresArray([PermissionStore, GuildChannelStore], () => {
const r3 = env11772;
if (GuildChannelStore !== void 0 && PermissionStore !== void 0) {
let env28345;
const r7 = env28345 = {
$parent: r3
};
env28345[0] = PermissionStore;
return c23003_0 == null ? [] : GuildChannelStore.getChannels(c23003_0)[GUILD_SELECTABLE_CHANNELS_KEY].filter($mk99349(r7)).map($mk99350());
}
});
}