Files
discord-decomp/modules/premium/roadblocks/native/utils/PremiumFeatureUpsellUtils.tsx
T
2026-11-01 12:12:55 +02:00

36 lines
1.3 KiB
TypeScript

// Metro module 6209 (f6210).
import { SoundboardSoundGridSectionType } from "../../../../soundboard/SoundboardTypes";
import { EntitlementFeatureNames } from "../../../../../_bundle/Module6201";
import { UpsellTypes } from "../../../../../ConstantsIOS";
import Module38 from "../../../../../_bundle/Module38";
export function isSoundboardSectionNitroLocked(a0, a1) {
return a1.type === SoundboardSoundGridSectionType.GUILD && a1.guild.id !== a0;
}
export function getUpsellType(a0) {
if (EntitlementFeatureNames.ANIMATED_EMOJIS === a0) {
return UpsellTypes.ANIMATED_EMOJI;
}
if (EntitlementFeatureNames.EMOJIS_EVERYWHERE === a0) {
return UpsellTypes.GLOBAL_EMOJI;
}
if (EntitlementFeatureNames.INCREASED_FILE_UPLOAD_SIZE === a0) {
return UpsellTypes.UPLOAD;
}
if (EntitlementFeatureNames.SOUNDBOARD_EVERYWHERE === a0) {
return UpsellTypes.SOUNDBOARD;
}
if (EntitlementFeatureNames.CLIENT_THEMES === a0) {
return UpsellTypes.CLIENT_THEMES;
}
if (EntitlementFeatureNames.APP_ICONS === a0) {
return UpsellTypes.APP_ICONS;
}
if (EntitlementFeatureNames.SAVED_MESSAGES === a0) {
return UpsellTypes.FOR_LATER;
}
if (EntitlementFeatureNames.STREAM_HIGH_QUALITY === a0) {
return UpsellTypes.STREAM_HIGH_QUALITY;
}
Module38(false, `Missing featureName: ${a0}`);
}