decord/source/modules/premium/native/launchPremiumPlanSelect.tsx
2026-08-26 06:04:24 +00:00

79 lines
3.1 KiB
TypeScript

// Module ID: 7082
// Function ID: 7083
// Name: launchPremiumPlanSelect
// Dependencies: [676, 7080, 4675, 7083, 2009, 7083, 6188, 2]
// Exports: launchPremiumPlanSelect
// Module 7082 (launchPremiumPlanSelect)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import asyncRequireImpl from "asyncRequireImpl" /* 2009 */;
import getSanitizedRestrictedGuilds from "getSanitizedRestrictedGuilds" /* 6188 */;
import PremiumModal from "PremiumModal" /* 7083 */;
const UserSettingsSections = ME.UserSettingsSections;
let result = set.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 = closure_1_0(closure_1_2[1]).shouldAlwaysExcludeFromPlanSelect(isDeprecated, flag2);
let tmp2 = !result;
if (!result) {
let flag;
if (callback != null) {
flag = callback(isDeprecated);
}
if (flag == null) {
flag = true;
}
tmp2 = flag;
}
return tmp2;
}
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
if (null != navigation) {
let obj = { predicate: null, analyticsLocation: null, analyticsLocations: null, showCurrentPlan: null, isBoostPurchaseFlow: null, planId: null, applicationId: null, guildId: null, onPaymentSuccess: null, onPaymentDismiss: null };
obj[0] = wrappedPredicate;
obj[1] = analyticsLocation;
obj[2] = analyticsLocations;
obj[3] = showCurrentPlan;
obj[4] = flag;
obj[5] = planId;
obj[6] = applicationId;
obj[7] = guildId;
obj[8] = onPaymentSuccess;
obj[9] = onPaymentDismiss;
navigation.push(PREMIUM_PLAN_SELECT, obj);
} else {
obj = { initialRoute: null, analyticsLocation: null, analyticsLocations: null, predicate: null, showCurrentPlan: null, isBoostPurchaseFlow: null, planId: null, applicationId: null, guildId: null, onBack: null, onPaymentSuccess: null, onPaymentDismiss: null };
obj[0] = PREMIUM_PLAN_SELECT;
obj[1] = analyticsLocation;
obj[2] = analyticsLocations;
obj[3] = wrappedPredicate;
obj[4] = showCurrentPlan;
obj[5] = flag;
obj[6] = planId;
obj[7] = applicationId;
obj[8] = guildId;
obj[9] = tmp;
obj[10] = onPaymentSuccess;
obj[11] = onPaymentDismiss;
const obj3 = flag2(4675);
obj3.pushLazy(asyncRequireImpl(7083, dependencyMap.paths), obj, PremiumModal.PREMIUM_KEY);
const tmp7 = asyncRequireImpl(7083, dependencyMap.paths);
}
let result = getSanitizedRestrictedGuilds.trackUserSettingsPaneViewed({ destinationPane: PREMIUM_PLAN_SELECT });
};