decord/source/modules/premium/native/launchPremiumPlanSelect.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

58 lines
2.5 KiB
TypeScript

// Module ID: 7463
// Function ID: 7464
// Name: launchPremiumPlanSelect
// Dependencies: [1074, 7461, 4808, 7464, 1896, 7464, 7047, 2]
// Exports: launchPremiumPlanSelect
// Module 7463 (launchPremiumPlanSelect)
import Constants from "Constants" /* 1074 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
import UserSettingsUtils from "UserSettingsUtils" /* 7047 */;
import PremiumBundledPlansUtils from "PremiumBundledPlansUtils" /* 7461 */;
import PremiumModal from "PremiumModal" /* 7464 */;
import size from "module_2" /* 2 */;
const UserSettingsSections = Constants.UserSettingsSections;
let result = size.fileFinishedImporting("modules/premium/native/launchPremiumPlanSelect.tsx");
export const launchPremiumPlanSelect = function launchPremiumPlanSelect(isBoostPurchaseFlow) {
({ predicate: require, navigation, showCurrentPlan } = isBoostPurchaseFlow);
if (showCurrentPlan === undefined) {
showCurrentPlan = true;
}
let flag = isBoostPurchaseFlow.isBoostPurchaseFlow;
if (flag === undefined) {
flag = false;
}
let flag2 = isBoostPurchaseFlow.allowYearlyBundles;
if (flag2 === undefined) {
flag2 = false;
}
({ analyticsLocation, analyticsLocations, planId, applicationId, guildId, onPaymentSuccess, onPaymentDismiss } = isBoostPurchaseFlow);
function wrappedPredicate(isDeprecated) {
const result = PremiumBundledPlansUtils.shouldAlwaysExcludeFromPlanSelect(isDeprecated, flag2);
let tmp2 = !result;
if (!result) {
let flag;
if (closure_1_0 != null) {
flag = closure_1_0(isDeprecated);
}
if (flag == null) {
flag = true;
}
tmp2 = flag;
}
return tmp2;
}
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 };
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(4808);
obj3.pushLazy(asyncRequireImpl(7464, dependencyMap.paths), obj4, PremiumModal.PREMIUM_KEY);
const tmp7 = asyncRequireImpl(7464, dependencyMap.paths);
}
let result = UserSettingsUtils.trackUserSettingsPaneViewed({ destinationPane: PREMIUM_PLAN_SELECT });
};