41 lines
2.0 KiB
TypeScript
41 lines
2.0 KiB
TypeScript
// Metro module 1370 (f1371).
|
|
import EmbeddedActivitiesStore from "../activities/EmbeddedActivitiesStore";
|
|
import CollectiblesMarketingsStore from "../collectibles/CollectiblesMarketingsStore";
|
|
import { DismissibleContent } from "../../_bundle/Module1358";
|
|
import { CollectiblesMarketingSurface } from "../../_bundle/Module13124";
|
|
import { getNewestBadgeableVersion } from "../app_launcher/utils/AppLauncherBadgeUtils";
|
|
import { EmbeddedActivitySurfaces } from "../../flow/Server";
|
|
import { getWideBannerDismissibleContentVersion } from "../collectibles/utils/WideBannerDismissibleContentVersion";
|
|
import { assertUnreachable } from "../../_bundle/Module1385";
|
|
export function getVersionedDismissibleContentCurrentVersion(a0) {
|
|
if (DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING === a0) {
|
|
let r79 = CollectiblesMarketingsStore.getMarketingBySurface(CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON)?.version;
|
|
if (r79 == null) {
|
|
r79 = 0;
|
|
}
|
|
return r79;
|
|
}
|
|
if (DismissibleContent.ACTIVITIES_VOICE_LAUNCHER_BADGE === a0) {
|
|
return getNewestBadgeableVersion({
|
|
storeState: EmbeddedActivitiesStore.getState(),
|
|
surface: EmbeddedActivitySurfaces.VOICE_LAUNCHER
|
|
});
|
|
}
|
|
if (DismissibleContent.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK !== a0 && DismissibleContent.GUILD_POWERUP_NEW_PERK_AVAILABLE_BADGE !== a0) {
|
|
if (DismissibleContent.COLLECTIBLES_SHOP_WIDE_BANNER === a0) {
|
|
return getWideBannerDismissibleContentVersion();
|
|
}
|
|
if (DismissibleContent.GAME_SHOP_ANNOUNCEMENT_MODAL !== a0 && DismissibleContent.SLAYER_STOREFRONT_VC_GIFTING_STREAM_HEADER_NEW_BADGE !== a0 && DismissibleContent.SLAYER_STOREFRONT_VC_GIFTING_PANEL_APP_WIDGET_CTA !== a0 && DismissibleContent.COLLECTIBLES_SHOP_SLAYER_STOREFRONT_PROMOTIONAL_BANNER !== a0) {
|
|
if (DismissibleContent.COLLECTIBLES_SHOP_GAME_SERVER_HOSTING_BANNER === a0) {
|
|
return 0;
|
|
}
|
|
assertUnreachable(a0, {
|
|
andFail: false
|
|
});
|
|
return 0;
|
|
}
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|