Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
44 lines
1.9 KiB
TypeScript
44 lines
1.9 KiB
TypeScript
// Module ID: 11691
|
|
// Function ID: 11692
|
|
// Name: useGroupDMNitroUpsellAction
|
|
// Dependencies: [19, 1074, 11684, 1242, 7455, 11690, 2]
|
|
// Exports: default
|
|
|
|
// Module 11691 (useGroupDMNitroUpsellAction)
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
|
|
import GroupDMNitroUpsellModel from "GroupDMNitroUpsellModel" /* 11684 */;
|
|
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(7455).openUserSettings(obj4);
|
|
} else if (tmp(11684).GroupDMNitroUpsellRoute.MARKETING === groupDMNitroUpsellRoute) {
|
|
const obj6 = { location: _location };
|
|
AnalyticsUtilsDefault.track(constants.PREMIUM_PROMOTION_OPENED, obj6);
|
|
const result = tmp(11690).navigateToPremiumHomePage();
|
|
} else if (tmp(11684).GroupDMNitroUpsellRoute.CHECKOUT === groupDMNitroUpsellRoute) {
|
|
if (onCheckout != null) {
|
|
onCheckout();
|
|
}
|
|
}
|
|
}, items);
|
|
};
|