decord/source/modules/premium/gifting/utils/PremiumGiftingIntentUtils.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

52 lines
2.1 KiB
TypeScript

// Module ID: 11846
// Function ID: 11847
// Name: PremiumGiftingIntentUtils
// Dependencies: [1373, 1074, 2]
// Exports: getGiftIntentTypeForLocation, getPremiumGiftingIntentAnalyticsLocation, parseGiftIntentType
// Module 11846 (PremiumGiftingIntentUtils)
import Constants from "Constants" /* 1074 */;
import PremiumConstants from "PremiumConstants" /* 1373 */;
import size from "module_2" /* 2 */;
const GiftIntentType = PremiumConstants.GiftIntentType;
const AnalyticsLocations = Constants.AnalyticsLocations;
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);
const result = size.fileFinishedImporting("modules/premium/gifting/utils/PremiumGiftingIntentUtils.tsx");
export const getPremiumGiftingIntentAnalyticsLocation = function getPremiumGiftingIntentAnalyticsLocation(arg0) {
if (arg0 === GiftIntentType.FRIEND_ANNIVERSARY) {
({ FRIEND_ANNIVERSARIES_CHAT: obj2.chat, FRIEND_ANNIVERSARIES_ACTION_BUTTON: obj2.actionButton, FRIEND_ANNIVERSARIES_ACTION_BUTTON_COACHMARK: obj2.actionButtonCoachmark } = AnalyticsLocations);
let obj = { chat: null, actionButton: null, actionButtonCoachmark: null };
const obj3 = { chat: null, actionButton: null, actionButtonCoachmark: null };
} else {
obj = {};
}
return obj;
};
export const getGiftIntentTypeForLocation = function getGiftIntentTypeForLocation(arg0) {
value = map.get(arg0);
if (value == null) {
value = null;
}
return value;
};
export const parseGiftIntentType = function parseGiftIntentType(giftIntentType) {
let tmp = null;
if (typeof giftIntentType === "number") {
tmp = null;
if (giftIntentType in GiftIntentType) {
tmp = null;
if (giftIntentType !== GiftIntentType.UNSPECIFIED) {
tmp = giftIntentType;
}
}
}
return tmp;
};