decord/source/modules/premium/native/launchPremiumPlanSelect.tsx

59 lines
2.5 KiB
TypeScript
Raw Normal View History

// Module ID: 7514
// Function ID: 7515
2026-07-20 16:05:17 +00:00
// Name: launchPremiumPlanSelect
// Dependencies: [1074, 7512, 4839, 7515, 1896, 7515, 7098, 2]
2026-07-20 16:05:17 +00:00
// Exports: launchPremiumPlanSelect
// Module 7514 (launchPremiumPlanSelect)
import Constants from "Constants" /* 1074 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
import UserSettingsUtils from "UserSettingsUtils" /* 7098 */;
import PremiumBundledPlansUtils from "PremiumBundledPlansUtils" /* 7512 */;
import PremiumModal from "PremiumModal" /* 7515 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const UserSettingsSections = Constants.UserSettingsSections;
let result = size.fileFinishedImporting("modules/premium/native/launchPremiumPlanSelect.tsx");
2026-07-20 16:05:17 +00:00
export const launchPremiumPlanSelect = function launchPremiumPlanSelect(isBoostPurchaseFlow) {
2026-07-23 10:11:24 +00:00
({ predicate: require, navigation, showCurrentPlan } = isBoostPurchaseFlow);
2026-07-20 16:05:17 +00:00
if (showCurrentPlan === undefined) {
showCurrentPlan = true;
}
let flag = isBoostPurchaseFlow.isBoostPurchaseFlow;
if (flag === undefined) {
flag = false;
}
2026-07-31 08:44:05 +00:00
let flag2 = isBoostPurchaseFlow.allowYearlyBundles;
if (flag2 === undefined) {
flag2 = false;
}
2026-07-20 16:05:17 +00:00
({ analyticsLocation, analyticsLocations, planId, applicationId, guildId, onPaymentSuccess, onPaymentDismiss } = isBoostPurchaseFlow);
function wrappedPredicate(isDeprecated) {
const result = PremiumBundledPlansUtils.shouldAlwaysExcludeFromPlanSelect(isDeprecated, flag2);
2026-07-29 08:29:29 +00:00
let tmp2 = !result;
if (!result) {
let flag;
if (closure_1_0 != null) {
flag = closure_1_0(isDeprecated);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = true;
}
tmp2 = flag;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
if (null != navigation) {
const obj = { predicate: wrappedPredicate, analyticsLocation, analyticsLocations, showCurrentPlan, isBoostPurchaseFlow: flag, planId, applicationId, guildId, onPaymentSuccess, onPaymentDismiss };
2026-07-20 16:05:17 +00:00
navigation.push(PREMIUM_PLAN_SELECT, obj);
} else {
const obj4 = { initialRoute: PREMIUM_PLAN_SELECT, analyticsLocation, analyticsLocations, predicate: wrappedPredicate, showCurrentPlan, isBoostPurchaseFlow: flag, planId, applicationId, guildId, onBack: tmp, onPaymentSuccess, onPaymentDismiss };
const obj3 = flag2(4839);
obj3.pushLazy(asyncRequireImpl(7515, dependencyMap.paths), obj4, PremiumModal.PREMIUM_KEY);
const tmp7 = asyncRequireImpl(7515, dependencyMap.paths);
2026-07-20 16:05:17 +00:00
}
let result = UserSettingsUtils.trackUserSettingsPaneViewed({ destinationPane: PREMIUM_PLAN_SELECT });
2026-07-20 16:05:17 +00:00
};