68 lines
4.9 KiB
TypeScript
68 lines
4.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] */
|
|
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
|
|
import PremiumUpsellUtils from '../../../utils/native/PremiumUpsellUtils.tsx'; /* Metro dependency 7882 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as MobileTrialUtilsModule from '../../premium/native/MobileTrialUtils.tsx'; /* Metro dependency 7061 */
|
|
import * as NitroWheelIconModule from '../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
|
|
|
|
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_10 = (CreateStylesModule).createStyles({nitroWheel: {marginRight: 2}});
|
|
(FileImportTrackerModule).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 intl;
|
|
const styles = useStyles();
|
|
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
|
|
const value2 = (MobileTrialUtilsModule).useNitroTrialCtaOverride('user_profile_upsell_button');
|
|
ReactModule.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 = (ButtonNativeModule).Button;
|
|
object = {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);
|
|
}
|
|
object.text = r5;
|
|
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
|
|
object.icon = (
|
|
<NitroWheelIcon
|
|
color="white"
|
|
size="sm"
|
|
style={styles.nitroWheel}
|
|
/>
|
|
);
|
|
return <Button {...object} />;
|
|
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 = 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}}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun100652, 13186, [31, 661, 1880, 33, 4501, 6771, 7061, 683, 4578, 7882, 1244, 7954,
|
|
2]) /* metro module 13186, dependencies: [31, 661, 1880, 33, 4501, 6771, 7061, 683, 4578, 7882, 1244, 7954, 2] */;
|