decord/alpha/source/modules/premium/native/launchPremiumPlanSelect.tsx
github-actions 6eea20b8e1 chore: update source for alpha 348.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-24 10:59:02 +00:00

58 lines
2.5 KiB
TypeScript

// Module ID: 7741
// Function ID: 7742
// Name: launchPremiumPlanSelect
// Dependencies: [1074, 7739, 5032, 7742, 1980, 7742, 7328, 2]
// Exports: launchPremiumPlanSelect
// Module 7741 (launchPremiumPlanSelect)
import Constants from "Constants" /* 1074 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1980 */;
import UserSettingsUtils from "UserSettingsUtils" /* 7328 */;
import PremiumBundledPlansUtils from "PremiumBundledPlansUtils" /* 7739 */;
import PremiumModal from "PremiumModal" /* 7742 */;
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(5032);
obj3.pushLazy(asyncRequireImpl(7742, dependencyMap.paths), obj4, PremiumModal.PREMIUM_KEY);
const tmp7 = asyncRequireImpl(7742, dependencyMap.paths);
}
let result = UserSettingsUtils.trackUserSettingsPaneViewed({ destinationPane: PREMIUM_PLAN_SELECT });
};