Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
108 lines
3.5 KiB
TypeScript
108 lines
3.5 KiB
TypeScript
// Module ID: 10664
|
|
// Function ID: 10665
|
|
// Name: badgeDetailsCtas
|
|
// Dependencies: [1074, 1076, 7622, 1115, 4516, 6795, 6956, 6598, 10665, 5756, 10113, 2]
|
|
// Exports: getBadgeDetailsCta
|
|
|
|
// Module 10664 (badgeDetailsCtas)
|
|
import Constants from "Constants" /* 1074 */;
|
|
import CollectiblesShopConstants from "CollectiblesShopConstants" /* 1076 */;
|
|
import util from "util" /* 1115 */;
|
|
import openURLDefault from "openURL" /* 4516 */;
|
|
import QuestContent from "QuestContent" /* 5756 */;
|
|
import AnalyticsLocationDefault from "AnalyticsLocation" /* 6598 */;
|
|
import openUserSettings from "openUserSettings" /* 6795 */;
|
|
import CollectiblesActionCreators from "CollectiblesActionCreators" /* 6956 */;
|
|
import BadgeId from "BadgeId" /* 7622 */;
|
|
import utils_openGiftModal from "utils/openGiftModal" /* 10113 */;
|
|
import QuestUtils from "QuestUtils" /* 10665 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const UserSettingsSections = Constants.UserSettingsSections;
|
|
const constants = CollectiblesShopConstants.CollectiblesMobileShopScreen;
|
|
let closure_5 = {
|
|
[BadgeId.BadgeId.STAFF]: {
|
|
ctaLabel() {
|
|
const intl = util.intl;
|
|
return intl.string(util.t.q7A8hP);
|
|
},
|
|
ctaAction() {
|
|
return openURLDefault("https://discord.com/careers");
|
|
}
|
|
},
|
|
[BadgeId.BadgeId.PREMIUM_TENURE]: {
|
|
ctaLabel(arg0) {
|
|
({ owned, isViewerOnUpgradeableNitro } = arg0);
|
|
const intl = util.intl;
|
|
const string = intl.string;
|
|
const t = util.t;
|
|
if (isViewerOnUpgradeableNitro) {
|
|
let stringResult = string(t.uKFeS1);
|
|
} else if (owned) {
|
|
stringResult = string(t.xGjjkd);
|
|
} else {
|
|
stringResult = string(t.BTxm69);
|
|
}
|
|
return stringResult;
|
|
},
|
|
ctaAction() {
|
|
return openUserSettings.openUserSettings({ screen: UserSettingsSections.PREMIUM });
|
|
}
|
|
},
|
|
[BadgeId.BadgeId.GUILD_BOOSTER]: {
|
|
ctaLabel(owned) {
|
|
const intl = util.intl;
|
|
const string = intl.string;
|
|
const t = util.t;
|
|
if (owned.owned) {
|
|
let stringResult = string(t.VMvz3m);
|
|
} else {
|
|
stringResult = string(t.xFVZeU);
|
|
}
|
|
return stringResult;
|
|
},
|
|
ctaAction() {
|
|
return openUserSettings.openUserSettings({ screen: UserSettingsSections.GUILD_BOOSTING });
|
|
}
|
|
},
|
|
[BadgeId.BadgeId.ORB_PROFILE]: {
|
|
ctaLabel() {
|
|
const intl = util.intl;
|
|
return intl.string(util.t.EBYkzk);
|
|
},
|
|
ctaAction() {
|
|
const obj2 = { screen: constants.ORBS, analyticsLocations: null, analyticsSource: null };
|
|
const items = [AnalyticsLocationDefault.BADGE];
|
|
obj2.analyticsLocations = items;
|
|
obj2.analyticsSource = AnalyticsLocationDefault.BADGE;
|
|
return CollectiblesActionCreators.openCollectiblesShopMobile(obj2);
|
|
}
|
|
},
|
|
[BadgeId.BadgeId.QUEST_COMPLETED]: {
|
|
ctaLabel() {
|
|
const intl = util.intl;
|
|
return intl.string(util.t.swICIT);
|
|
},
|
|
ctaAction() {
|
|
const obj = QuestUtils;
|
|
return obj.openQuestHome({ fromContent: QuestContent.QuestContent.QUEST_BADGE });
|
|
}
|
|
},
|
|
[BadgeId.BadgeId.GIFTING]: {
|
|
ctaLabel() {
|
|
const intl = util.intl;
|
|
return intl.string(util.t["nUA/JW"]);
|
|
},
|
|
ctaAction() {
|
|
const obj2 = { analyticsLocations: null };
|
|
const items = [AnalyticsLocationDefault.BADGE];
|
|
obj2.analyticsLocations = items;
|
|
return utils_openGiftModal.openGiftModal(obj2);
|
|
}
|
|
}
|
|
};
|
|
const result = size.fileFinishedImporting("modules/badges/native/badgeDetailsCtas.tsx");
|
|
|
|
export const getBadgeDetailsCta = function getBadgeDetailsCta(badge_id) {
|
|
return closure_5[badge_id];
|
|
};
|