decord/source/modules/user_profile/native/UserProfileUpsellButton.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

60 lines
2.8 KiB
TypeScript

// Module ID: 14622
// Function ID: 14623
// Name: UserProfileUpsellButton
// Dependencies: [19, 1074, 1373, 21, 4574, 7176, 7460, 1242, 4989, 9345, 1114, 8695, 2]
// Exports: default
// Module 14622 (UserProfileUpsellButton)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
import PremiumUpsellUtilsDefault from "PremiumUpsellUtils" /* 9345 */;
import noop from "module_19" /* 19 */;
const require = fn;
const Constants = fn(1074);
({ AnalyticsPages: closure_4, UpsellTypes: hasOwnProperty, AnalyticsSections: metroRequire, AnalyticEvents: closure_7 } = Constants);
const PremiumUpsellTypes = fn(1373).PremiumUpsellTypes;
const jsx = fn(21).jsx;
const createStyles = fn(4574);
let closure_10 = createStyles.createStyles({ nitroWheel: { marginRight: 2 } });
const size = fn(2);
let result = size.fileFinishedImporting("modules/user_profile/native/UserProfileUpsellButton.tsx");
export default function UserProfileUpsellButton(analyticsObject) {
analyticsObject = analyticsObject.analyticsObject;
let analyticsLocations;
analyticsLocations = analyticsLocations(7176)().analyticsLocations;
const tmp = closure_10();
let label = analyticsObject(7460).useNitroTrialCtaOverride("user_profile_upsell_button");
const items = [analyticsLocations, analyticsObject];
const effect = noop.useEffect(() => {
const obj2 = { type: PremiumUpsellTypes.CUSTOM_PROFILE_SETTINGS_BANNER_BUTTON, location: { page: constants.USER_SETTINGS, section: constants3.USER_PROFILE, object: analyticsObject }, location_stack: analyticsLocations };
AnalyticsUtilsDefault.track(constants4.PREMIUM_UPSELL_VIEWED, obj2);
}, items);
let obj2 = {
onPress() {
const obj2 = { initialUpsellKey: constants2.CUSTOM_PROFILES, analyticsLocation: { page: constants.USER_SETTINGS, section: constants3.USER_PROFILE, object: analyticsObject }, analyticsLocations, analyticsProperties: { type: PremiumUpsellTypes.CUSTOM_PROFILE_UPSELL } };
const result = PremiumUpsellUtilsDefault.handleShowUpsellAlert(obj2);
},
variant: "active",
text: null,
icon: null
};
if (label == null) {
label = analyticsObject.label;
}
if (label == null) {
const intl = tmp3(1114).intl;
label = intl.string(tmp3(1114).t.pj0XBN);
}
obj2.text = label;
obj2.icon = jsx(analyticsObject(8695).NitroWheelIcon, { color: "white", size: "sm", style: tmp.nitroWheel });
return jsx(analyticsObject(4989).Button, {
onPress() {
const obj2 = { initialUpsellKey: constants2.CUSTOM_PROFILES, analyticsLocation: { page: constants.USER_SETTINGS, section: constants3.USER_PROFILE, object: analyticsObject }, analyticsLocations, analyticsProperties: { type: PremiumUpsellTypes.CUSTOM_PROFILE_UPSELL } };
const result = PremiumUpsellUtilsDefault.handleShowUpsellAlert(obj2);
},
variant: "active",
text: null,
icon: null
});
};