Files
discord-decomp/sources/modules/verification/native/components/ChangeEmailWarning.tsx
T
2026-07-28 01:06:53 +03:00

151 lines
8.3 KiB
TypeScript

/* Metro module 8959; source: modules/verification/native/components/ChangeEmailWarning.tsx; dependencies: [31, 27, 1878, 8957, 661, 33, 4501, 697, 1484, 566, 683, 676, 5473, 4573, 1244, 6766, 4578, 8953, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import EmailVerificationModalActionCreators from '../../../../actions/native/EmailVerificationModalActionCreators.tsx'; /* Metro dependency 8953 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as VerificationConstantsModule from '../../VerificationConstants.tsx'; /* Metro dependency 8957 */
function _fun69856(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9144:6, offset: 0x01ce57d2, size: 443 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.container = {'flex': 1, 'padding': null, 'alignItems': 'center', 'justifyContent': 'center', padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.title = {marginTop: PX_16};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.body = {marginTop: PX_8, textAlign: 'center'};
const object4 = {flexDirection: 'row'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
object.buttonContainer = object4;
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/verification/native/components/ChangeEmailWarning.tsx');
exports.default = ChangeEmailWarning;
function ChangeEmailWarning({changeEmailReason}) { // fn#69857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9144:653, offset: 0x01ce598d, size: 775 bytes, params: 2, frame: 31
var r0;
var items2;
var Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var TextWithIOSLinkWorkaround;
const Button = (ButtonNativeModule).Button;
var items3;
var value;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
if (currentUser == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
const TrafficConeSpotIllustration = (require(5473) /* metro dependency 5473: native */).TrafficConeSpotIllustration;
items2 = [
<TrafficConeSpotIllustration />,
];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t.hhR7gX])}
</Text>
);
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'accessibilityRole': 'header', 'variant': 'text-md/normal',
'color': 'mobile-text-heading-primary', style: styles.body};
value = intl.format(t.rqWXUf, {hcArticle: COMMON_SCAMS_EDUCATION_HC_ARTICLE});
string = intl.string;
items2[2] = (
<TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>
{[value, '\n\n', Reflect.apply(string, intl, [t['3LW10C']])]}
</TextWithIOSLinkWorkaround>
);
var viewBindingProps2 = {style: styles.buttonContainer};
string = intl.string;
value = (
<Button
size="md"
variant="tertiary"
text={Reflect.apply(string, intl, [t.rwTBFs])}
onPress={ReactModule.useCallback(_fun69859, [value2, changeEmailReason])}
shrink
/>
);
items3 = [value];
string = intl.string;
items3[1] = (
<Button
size="md"
variant="primary"
text={Reflect.apply(string, intl, [t['ETE/oC']])}
onPress={onPress_69860}
shrink
/>
);
items2[3] = (
<View {...viewBindingProps2}>
{items3}
</View>
);
value = (
<ScrollView keyboardShouldPersistTaps="handled" alwaysBounceVertical={false}>
<View {...viewBindingProps}>
{items2}
</View>
</ScrollView>
);
r0 = value;
}
return r0;
function _fun69859() { // fn#69859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9144:816, offset: 0x01ce5c94, size: 104 bytes, params: 1, frame: 18
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const USER_ACCOUNT_EMAIL_CHANGE_WARNING_CONTINUE = AnalyticEvents.USER_ACCOUNT_EMAIL_CHANGE_WARNING_CONTINUE;
Reflect.apply(track, defaultImport, [USER_ACCOUNT_EMAIL_CHANGE_WARNING_CONTINUE,
{change_email_reason_enum: changeEmailReason}]);
const binding = env0_1;
const push = binding.push;
const VerificationModalScenes = (ConstantsIOSModule).VerificationModalScenes;
const ENTER_EMAIL = VerificationModalScenes.ENTER_EMAIL;
Reflect.apply(push, binding, [ENTER_EMAIL]);
}
function ChangeEmailWarningOnPress() { // fn#69860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9144:1832, owner: ChangeEmailWarning.onPress, offset: 0x01ce5cfc, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (EmailVerificationModalActionCreators).close();
}
}
}
global.__d(_fun69856, 8959, [31, 27, 1878, 8957, 661, 33, 4501, 697, 1484, 566, 683, 676, 5473, 4573, 1244, 6766,
4578, 8953,
2]) /* metro module 8959, dependencies: [31, 27, 1878, 8957, 661, 33, 4501, 697, 1484, 566, 683, 676, 5473, 4573, 1244, 6766, 4578, 8953, 2] */;