decord/source/modules/user_profile/native/UserProfileUpsellButton.tsx
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

60 lines
2.8 KiB
TypeScript

// Module ID: 14692
// Function ID: 14693
// Name: UserProfileUpsellButton
// Dependencies: [19, 1074, 1374, 21, 4639, 7269, 7553, 1241, 5059, 9445, 1115, 8788, 2]
// Exports: default
// Module 14692 (UserProfileUpsellButton)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import PremiumUpsellUtilsDefault from "PremiumUpsellUtils" /* 9445 */;
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(1374).PremiumUpsellTypes;
const jsx = fn(21).jsx;
const createStyles = fn(4639);
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(7269)().analyticsLocations;
const tmp = closure_10();
let label = analyticsObject(7553).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(1115).intl;
label = intl.string(tmp3(1115).t.pj0XBN);
}
obj2.text = label;
obj2.icon = jsx(analyticsObject(8788).NitroWheelIcon, { color: "white", size: "sm", style: tmp.nitroWheel });
return jsx(analyticsObject(5059).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
});
};