decord/source/modules/guild_themes/GuildThemeAnalyticsUtils.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

44 lines
1.4 KiB
TypeScript

// Module ID: 16834
// Function ID: 16835
// Name: GuildThemeAnalyticsUtils
// Dependencies: [1979, 2]
// Exports: collectGuildThemeAnalyticsMetadata
// Module 16834 (GuildThemeAnalyticsUtils)
import GuildStore from "GuildStore" /* 1979 */;
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild_themes/GuildThemeAnalyticsUtils.tsx");
export const collectGuildThemeAnalyticsMetadata = function collectGuildThemeAnalyticsMetadata(selectedGuildId) {
if (null == selectedGuildId) {
return null;
} else {
const guild = GuildStore.getGuild(selectedGuildId);
if (null == guild) {
return null;
} else {
const guildTheme = guild.guildTheme;
if (null != guildTheme) {
if (guildTheme.enabled) {
const themeSettings = guildTheme.themeSettings;
let prop;
if (themeSettings != null) {
prop = themeSettings.customUserThemeSettings;
}
const obj = { guild_theme_enabled: true, guild_theme_is_custom: null != prop };
const themeSettings2 = guildTheme.themeSettings;
let presetId;
if (themeSettings2 != null) {
presetId = themeSettings2.presetId;
}
if (null != presetId) {
obj.guild_theme_preset_id = presetId;
}
return obj;
}
}
return { guild_theme_enabled: false, guild_theme_is_custom: false };
}
}
};