Files
discord-decomp/sources/modules/user_profile/native/UserProfileUpsellButton.tsx
T
2026-07-27 16:20:00 +03:00

57 lines
3.9 KiB
TypeScript

/* Metro module 13186; source: modules/user_profile/native/UserProfileUpsellButton.tsx; dependencies: [31, 661, 1880, 33, 4501, 6771, 7061, 683, 4578, 7882, 1244, 7954, 2] */
function _fun100652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13376:6, offset: 0x021f228b, size: 256 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticsPages;
const env0_5 = constantsModule.UpsellTypes;
const env0_6 = constantsModule.AnalyticsSections;
const env0_7 = constantsModule.AnalyticEvents;
const env0_8 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({nitroWheel: {marginRight: 2}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileUpsellButton.tsx');
exports.default = _default_100653;
}
function _default_100653({analyticsObject, label}) { // fn#100653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13376:297, offset: 0x021f238b, size: 320 bytes, params: 2, frame: 22
var object2;
var intl;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value2 = (require(7061) /* metro dependency 7061: MobileTrialUtils */).useNitroTrialCtaOverride('user_profile_upsell_button');
env0_3.useEffect(function() {
var defaultImport = importDefault(dependencyMap[7]);
var PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
defaultImport.track(PREMIUM_UPSELL_VIEWED, {type: PremiumUpsellTypes.CUSTOM_PROFILE_SETTINGS_BANNER_BUTTON,
location: {page: AnalyticsPages.USER_SETTINGS, section: AnalyticsSections.USER_PROFILE,
object: analyticsObject}, location_stack: analyticsLocations});
}, [analyticsLocations, analyticsObject]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
object2 = {onPress: onPress_100655, variant: 'active'};
let r5 = value2 ?? label;
if (r5 == null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pj0XBN);
}
object2.text = r5;
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
object2.icon = <NitroWheelIcon color="white" size="sm" style={styles.nitroWheel} />;
return <Button {...object2} />;
}
function _default_100653OnPress() { // fn#100655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13376:664, owner: _default_100653.onPress, offset: 0x021f2544, size: 134 bytes, params: 1, frame: 16
const defaultImport = importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */;
const handleShowUpsellAlert = defaultImport.handleShowUpsellAlert;
const CUSTOM_PROFILES = UpsellTypes.CUSTOM_PROFILES;
const USER_SETTINGS = AnalyticsPages.USER_SETTINGS;
const USER_PROFILE = AnalyticsSections.USER_PROFILE;
const CUSTOM_PROFILE_UPSELL = PremiumUpsellTypes.CUSTOM_PROFILE_UPSELL;
Reflect.apply(handleShowUpsellAlert, defaultImport, [{initialUpsellKey: CUSTOM_PROFILES,
analyticsLocation: {page: USER_SETTINGS, section: USER_PROFILE, object: analyticsObject},
analyticsLocations: analyticsLocations, analyticsProperties: {type: CUSTOM_PROFILE_UPSELL}}]);
}