2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 6523
|
|
|
|
|
// Function ID: 6524
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: DefaultChannelUtils
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [2100, 2045, 1074, 1086, 504, 4474, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: canChannelBeDefault, useCanChannelBeDefault
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 6523 (DefaultChannelUtils)
|
2026-09-26 17:57:22 +00:00
|
|
|
import BigFlagUtilsAll from "BigFlagUtils" /* 1086 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import PermissionUtilsAll from "PermissionUtils" /* 4474 */;
|
|
|
|
|
import GatedChannelStore from "GatedChannelStore" /* 2100 */;
|
|
|
|
|
import ChannelStore from "ChannelStore" /* 2045 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import Constants from "Constants" /* 1074 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
const require = globalThis.__r;
|
2026-10-01 14:13:23 +00:00
|
|
|
let _require;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let hasOwnProperty;
|
|
|
|
|
let metroRequire;
|
2026-09-18 19:45:33 +00:00
|
|
|
({ ChannelTypesSets: hasOwnProperty, Permissions: metroRequire } = Constants);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/guild_onboarding/DefaultChannelUtils.tsx");
|
|
|
|
|
|
2026-09-26 17:57:22 +00:00
|
|
|
export const useCanChannelBeDefault = function useCanChannelBeDefault(arg0, arg1) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_0;
|
2026-09-18 19:45:33 +00:00
|
|
|
_require = arg0;
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_1 = arg1;
|
|
|
|
|
let obj = require("get initialized");
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [GatedChannelStore, ChannelStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
return obj.useStateFromStores(items, () => {
|
2026-09-18 19:45:33 +00:00
|
|
|
const channel = ChannelStore.getChannel(closure_1);
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp = closure_1;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null != channel) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let VIEW_CHANNEL;
|
|
|
|
|
const GUILD_VOCAL = hasOwnProperty.GUILD_VOCAL;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (GUILD_VOCAL.has(channel.type)) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = BigFlagUtilsAll;
|
|
|
|
|
VIEW_CHANNEL = obj.combine(metroRequire.VIEW_CHANNEL, metroRequire.CONNECT);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let isChannelGatedResult = GatedChannelStore.isChannelGated(closure_0, tmp);
|
2026-09-18 19:45:33 +00:00
|
|
|
if (!isChannelGatedResult) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj2 = PermissionUtilsAll;
|
|
|
|
|
isChannelGatedResult = obj2.canEveryoneRole(VIEW_CHANNEL, channel);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
return isChannelGatedResult;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
VIEW_CHANNEL = metroRequire.VIEW_CHANNEL;
|
2026-09-18 19:45:33 +00:00
|
|
|
});
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|
2026-09-18 19:45:33 +00:00
|
|
|
export const canChannelBeDefault = function canChannelBeDefault(guild_id, id) {
|
|
|
|
|
const channel = ChannelStore.getChannel(id);
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = ChannelStore;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null != channel) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let VIEW_CHANNEL;
|
|
|
|
|
const GUILD_VOCAL = hasOwnProperty.GUILD_VOCAL;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (GUILD_VOCAL.has(channel.type)) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj2 = BigFlagUtilsAll;
|
|
|
|
|
VIEW_CHANNEL = obj2.combine(metroRequire.VIEW_CHANNEL, metroRequire.CONNECT);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
let isChannelGatedResult = GatedChannelStore.isChannelGated(guild_id, id);
|
|
|
|
|
if (!isChannelGatedResult) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj3 = PermissionUtilsAll;
|
|
|
|
|
isChannelGatedResult = obj3.canEveryoneRole(VIEW_CHANNEL, obj.getChannel(id));
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
return isChannelGatedResult;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
VIEW_CHANNEL = metroRequire.VIEW_CHANNEL;
|
2026-09-18 19:45:33 +00:00
|
|
|
};
|