decord/source/modules/premium/gifting/utils/PremiumGiftingIntentUtils.tsx

52 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11033
// Function ID: 11034
2026-07-20 16:05:17 +00:00
// Name: GiftIntentType
2026-08-11 06:20:06 +00:00
// Dependencies: [1924, 676, 2]
2026-07-20 16:05:17 +00:00
// Exports: getGiftIntentTypeForLocation, getPremiumGiftingIntentAnalyticsLocation, parseGiftIntentType
2026-08-24 06:08:38 +00:00
// Module 11033 (GiftIntentType)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import GuildFeatures from "GuildFeatures" /* 1924 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const GiftIntentType = GuildFeatures.GiftIntentType;
const AnalyticsLocations = ME.AnalyticsLocations;
2026-07-20 16:05:17 +00:00
const items = [AnalyticsLocations.FRIEND_ANNIVERSARIES_CHAT, GiftIntentType.FRIEND_ANNIVERSARY];
const items1 = [items, , ];
const items2 = [AnalyticsLocations.FRIEND_ANNIVERSARIES_ACTION_BUTTON, GiftIntentType.FRIEND_ANNIVERSARY];
items1[1] = items2;
const items3 = [AnalyticsLocations.FRIEND_ANNIVERSARIES_ACTION_BUTTON_COACHMARK, GiftIntentType.FRIEND_ANNIVERSARY];
items1[2] = items3;
const map = new Map(items1);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/premium/gifting/utils/PremiumGiftingIntentUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getPremiumGiftingIntentAnalyticsLocation = function getPremiumGiftingIntentAnalyticsLocation(arg0) {
if (arg0 === GiftIntentType.FRIEND_ANNIVERSARY) {
2026-07-29 08:29:29 +00:00
let obj = { chat: null, actionButton: null, actionButtonCoachmark: null };
({ FRIEND_ANNIVERSARIES_CHAT: obj2[0], FRIEND_ANNIVERSARIES_ACTION_BUTTON: obj2[1], FRIEND_ANNIVERSARIES_ACTION_BUTTON_COACHMARK: obj2[2] } = AnalyticsLocations);
2026-07-20 16:05:17 +00:00
} else {
obj = {};
}
return obj;
};
export const getGiftIntentTypeForLocation = function getGiftIntentTypeForLocation(arg0) {
2026-07-29 08:29:29 +00:00
let value = map.get(arg0);
if (value == null) {
value = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return value;
2026-07-20 16:05:17 +00:00
};
export const parseGiftIntentType = function parseGiftIntentType(giftIntentType) {
let tmp = null;
2026-08-04 21:03:28 +00:00
if (typeof giftIntentType === "number") {
2026-07-20 16:05:17 +00:00
tmp = null;
if (giftIntentType in GiftIntentType) {
tmp = null;
if (giftIntentType !== GiftIntentType.UNSPECIFIED) {
tmp = giftIntentType;
}
}
}
return tmp;
};