decord/source/modules/welcome_screen/useWelcomeScreenEnabled.tsx
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

51 lines
1.8 KiB
TypeScript

// Module ID: 12785
// Function ID: 12786
// Name: useWelcomeScreenEnabled
// Dependencies: [1961, 1957, 1979, 2011, 1074, 504, 2]
// Exports: default
// Module 12785 (useWelcomeScreenEnabled)
import Constants from "Constants" /* 1074 */;
import ChannelRecord from "ChannelRecord" /* 1961 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import GuildStore from "GuildStore" /* 1979 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2011 */;
import size from "module_2" /* 2 */;
const require = globalThis.__r;
const isGuildTextChannelType = ChannelRecord.isGuildTextChannelType;
const GuildFeatures = Constants.GuildFeatures;
const result = size.fileFinishedImporting("modules/welcome_screen/useWelcomeScreenEnabled.tsx");
export default function useWelcomeScreenEnabled(arg0, arg1) {
_require = arg0;
dependencyMap = arg1;
const items = [ChannelStore, GuildStore, SelectedChannelStore];
return require("initialize").useStateFromStores(items, () => {
const guild = GuildStore.getGuild(closure_1);
let hasItem;
if (guild != null) {
const features = guild.features;
hasItem = features.has(GuildFeatures.WELCOME_SCREEN_ENABLED);
}
if (true === hasItem) {
const features2 = guild.features;
if (features2.has(GuildFeatures.COMMUNITY)) {
const features3 = guild.features;
if (features3.has(tmp5.GUILD_SERVER_GUIDE)) {
return false;
} else {
const channel = ChannelStore.getChannel(closure_0);
let tmp9 = closure_0 === SelectedChannelStore.getChannelId(closure_1) && null != channel && channel.getGuildId() === guild.id;
if (tmp9) {
tmp9 = isGuildTextChannelType(channel.type);
}
return tmp9;
}
}
tmp5 = GuildFeatures;
}
return false;
});
};