// Module ID: 7217 // Function ID: 7218 // Name: getChannelIdForGuildTransition // Dependencies: [1960, 7096, 1957, 2012, 1979, 2011, 7218, 1074, 1964, 7222, 7224, 7226, 1982, 2] // Exports: getChannelIdForGuildTransition // Module 7217 (getChannelIdForGuildTransition) import getFavoritesAwareGuildName from "getFavoritesAwareGuildName" /* 1982 */; import useCanSeeOnboardingHome from "useCanSeeOnboardingHome" /* 7222 */; import getPrice from "getPrice" /* 7226 */; import closure_2 from "initializeFromUserSettings" /* 1960 */; import closure_3 from "shouldShowOnboarding" /* 7096 */; import closure_4 from "ensureGuildLoaded" /* 1957 */; import closure_5 from "comparator" /* 2012 */; import closure_6 from "createGuildRecordFromRust" /* 1979 */; import closure_7 from "handleConnectionOpen" /* 2011 */; import closure_8 from "makeSortedChannel" /* 7218 */; import { ME } from "ME" /* 1074 */; import { StaticChannelRoute } from "set" /* 1964 */; require = arg1; const result = require("set").fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx"); export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(guildId) { channelId = channelId.getChannelId(guildId); defaultChannel = defaultChannel.getDefaultChannel(guildId); let id; if (defaultChannel != null) { id = defaultChannel.id; } if (id == null) { let tmp5; if (guildId === ME) { privateChannelIds = privateChannelIds.getPrivateChannelIds(); let first; if (privateChannelIds.length > 0) { first = privateChannelIds[0]; } tmp5 = first; } id = tmp5; } if (channelId === StaticChannelRoute.GUILD_ONBOARDING) { if (!closure_3.shouldShowOnboarding(guildId)) { return id; } } if (channelId === StaticChannelRoute.GUILD_HOME) { if (!obj.canSeeOnboardingHome(guildId)) { return id; } obj = useCanSeeOnboardingHome; } if (channelId === StaticChannelRoute.GUILD_SPACE) { if (obj5.canUseGuildSpace(guild.getGuild(guildId), "getChannelIdForGuildTransition")) { id = channelId; } return id; } else { if (channelId === tmp8.GAME_SHOP) { if (obj2.canSeeGameShop(guildId)) { return channelId; } obj2 = getPrice; } channel = channel.getChannel(channelId); if (null != channel) { if (!channel.isGuildVocal()) { let tmp17 = channelId; if (obj4.isFavoritesGuildId(guildId)) { tmp17 = channelId; } obj4 = getFavoritesAwareGuildName; } return tmp17; } tmp17 = id; } };