decord/source/modules/group_dm/native/useGroupDMNitroUpsellAction.tsx
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

44 lines
1.9 KiB
TypeScript

// Module ID: 11727
// Function ID: 11728
// Name: useGroupDMNitroUpsellAction
// Dependencies: [19, 1074, 11720, 1242, 7485, 11726, 2]
// Exports: default
// Module 11727 (useGroupDMNitroUpsellAction)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
import GroupDMNitroUpsellModel from "GroupDMNitroUpsellModel" /* 11720 */;
import noop from "module_19" /* 19 */;
require = fn;
const Constants = fn(1074);
({ AnalyticEvents: closure_4, UserSettingsSections: hasOwnProperty } = Constants);
const size = fn(2);
let result = size.fileFinishedImporting("modules/group_dm/native/useGroupDMNitroUpsellAction.tsx");
export default function useGroupDMNitroUpsellAction(audience) {
audience = audience.audience;
const _location = audience.location;
const acquisitionStrategy = audience.acquisitionStrategy;
let onCheckout;
if (acquisitionStrategy === audience(acquisitionStrategy[2]).GroupDMNitroAcquisitionStrategy.CHECKOUT) {
onCheckout = audience.onCheckout;
}
const items = [acquisitionStrategy, audience, _location, onCheckout];
return onCheckout.useCallback(() => {
const groupDMNitroUpsellRoute = GroupDMNitroUpsellModel.getGroupDMNitroUpsellRoute(audience, acquisitionStrategy);
if (GroupDMNitroUpsellModel.GroupDMNitroUpsellRoute.MANAGE === groupDMNitroUpsellRoute) {
const obj3 = { location: _location };
AnalyticsUtilsDefault.track(constants.PREMIUM_PROMOTION_OPENED, obj3);
const obj4 = { screen: constants2.PREMIUM_MANAGE_PLAN };
tmp(7485).openUserSettings(obj4);
} else if (tmp(11720).GroupDMNitroUpsellRoute.MARKETING === groupDMNitroUpsellRoute) {
const obj6 = { location: _location };
AnalyticsUtilsDefault.track(constants.PREMIUM_PROMOTION_OPENED, obj6);
const result = tmp(11726).navigateToPremiumHomePage();
} else if (tmp(11720).GroupDMNitroUpsellRoute.CHECKOUT === groupDMNitroUpsellRoute) {
if (onCheckout != null) {
onCheckout();
}
}
}, items);
};