// Module ID: 6824 // Function ID: 6825 // Name: getGuildTransitionRoute // Dependencies: [2047, 6703, 6825, 2044, 4496, 2066, 2098, 6826, 1074, 2051, 6830, 6832, 6834, 2069, 5554, 2] // Exports: getGuildTransitionRoute // Module 6824 (getGuildTransitionRoute) import FavoritesUtils from "FavoritesUtils" /* 2069 */; import VibegrationsUtils from "VibegrationsUtils" /* 5554 */; import OnboardingHomeUtils from "OnboardingHomeUtils" /* 6830 */; import SlayerStorefrontUtils from "SlayerStorefrontUtils" /* 6834 */; import FavoriteStore from "FavoriteStore" /* 2047 */; import GuildOnboardingStore from "GuildOnboardingStore" /* 6703 */; import VibegrationsBuilderRouteStore from "VibegrationsBuilderRouteStore" /* 6825 */; import ChannelStore from "ChannelStore" /* 2044 */; import GuildChannelStore from "GuildChannelStore" /* 4496 */; import GuildStore from "GuildStore" /* 2066 */; import SelectedChannelStore from "SelectedChannelStore" /* 2098 */; import PrivateChannelSortStore from "PrivateChannelSortStore" /* 6826 */; require = fn; const ME = fn(1074).ME; const StaticChannelRoute = fn(2051).StaticChannelRoute; const size = fn(2); let result = size.fileFinishedImporting("modules/routing/getGuildTransitionRoute.tsx"); export const getGuildTransitionRoute = function getGuildTransitionRoute(guildId) { const lastProjectId = VibegrationsBuilderRouteStore.getLastProjectId(guildId); if (null != lastProjectId) { const guild = GuildStore.getGuild(guildId); let result = null != guild; if (result) { result = VibegrationsUtils.canAccessVibegrations(guild, "getChannelIdForGuildTransition"); } if (result) { const items = [StaticChannelRoute.VIBEGRATIONS, lastProjectId]; return items; } } const channelId = SelectedChannelStore.getChannelId(guildId); const defaultChannel = GuildChannelStore.getDefaultChannel(guildId); let id; if (defaultChannel != null) { id = defaultChannel.id; } if (id == null) { let tmp11; if (guildId === ME) { const privateChannelIds = PrivateChannelSortStore.getPrivateChannelIds(); let first; if (privateChannelIds.length > 0) { first = privateChannelIds[0]; } tmp11 = first; } id = tmp11; } if (channelId === StaticChannelRoute.GUILD_ONBOARDING) { if (!GuildOnboardingStore.shouldShowOnboarding(guildId)) { const items1 = [id, null]; return items1; } } if (channelId === StaticChannelRoute.GUILD_HOME) { if (!obj2.canSeeOnboardingHome(guildId)) { const items2 = [id, null]; return items2; } obj2 = OnboardingHomeUtils; } if (channelId === StaticChannelRoute.GUILD_SPACE) { const items3 = [, ]; if (obj7.canUseGuildSpace(GuildStore.getGuild(guildId), "getChannelIdForGuildTransition")) { items3[0] = channelId; items3[1] = null; let tmp33 = items3; } else { items3[0] = id; items3[1] = null; tmp33 = items3; } return tmp33; } else { if (channelId === tmp14.GAME_SHOP) { if (obj3.canSeeGameShop(guildId)) { const items4 = [channelId, null]; return items4; } obj3 = SlayerStorefrontUtils; } if (channelId === tmp14.VIBEGRATIONS) { const guild1 = GuildStore.getGuild(guildId); let result1 = null != guild1; if (result1) { result1 = VibegrationsUtils.canAccessVibegrations(guild1, "getChannelIdForGuildTransition"); } const items5 = [, ]; if (result1) { items5[0] = channelId; items5[1] = null; let tmp29 = items5; } else { items5[0] = id; items5[1] = null; tmp29 = items5; } return tmp29; } else { const channel = ChannelStore.getChannel(channelId); if (null != channel) { if (!channel.isGuildVocal()) { let items6 = [channelId, null]; } return items6; } const items7 = [id, null]; items6 = items7; } } };