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

143 lines
8.5 KiB
TypeScript

/* Metro module 15854; source: modules/verification/native/components/Overview.tsx; dependencies: [31, 27, 1373, 1878, 661, 33, 4501, 697, 1948, 566, 8961, 1484, 4571, 4578, 1244, 15638, 507, 7620, 4573, 6766, 13935, 2] */
function _fun121928(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:6, offset: 0x02554650, size: 515 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userRequiredActionStore = importDefault(1373) /* metro dependency 1373: UserRequiredActionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.Endpoints;
const env0_8 = value.VerificationModalScenes;
const env0_9 = value.VerificationTypes;
const HelpdeskArticles = value.HelpdeskArticles;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.Fragment;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.containerInner = {'flex': 1, 'padding': 20, 'justifyContent': 'center', 'alignItems': 'center'};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.title = {'marginTop': 20, 'fontSize': 17, 'textAlign': 'center', color: MOBILE_TEXT_HEADING_PRIMARY};
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
object2.body = {'marginTop': 4, 'marginBottom': 20, 'fontSize': 14, 'textAlign': 'center', color: PRIMARY_400};
object2.blocks = {'width': '60%', 'justifyContent': 'center'};
object2.verificationType = {marginBottom: 20};
object2.button = {'marginBottom': 20, 'marginHorizontal': 20, 'alignSelf': 'center'};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
value = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = value.getArticleURL;
const VERIFICATION_FAQ = HelpdeskArticles.VERIFICATION_FAQ;
const env0_14 = Reflect.apply(getArticleURL, value, [VERIFICATION_FAQ]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/verification/native/components/Overview.tsx');
exports.default = Overview;
}
function Overview() { // fn#121929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:945, offset: 0x02554853, size: 665 bytes, params: 1, frame: 30
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserRequiredActionStore],
_fun121930, [], (importDefault(8961) /* metro dependency 8961: VerificationUtils */).areVerificationTypesEqual);
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const defaultImport = importDefault(4571) /* metro dependency 4571: useBackPressHandler */;
const BackPressHandler = (require(4571) /* metro dependency 4571: useBackPressHandler */).BackPressHandler;
defaultImport(BackPressHandler.minimize);
const value4 = env0_3.useCallback(_fun121931, [value3, value2, styles.verificationType]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Iz0kDg = (require(1244) /* metro dependency 1244: indexNative */).t.Iz0kDg;
const items2 = [<Text variant="heading-lg/semibold" style={styles.title} accessibilityRole="header">{Reflect.apply(string,
intl, [Iz0kDg])}</Text>];
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
items2[1] = <TextWithIOSLinkWorkaround variant="text-sm/medium" style={styles.body}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0rqMV5'],
{helpCenterURL: env0_14})}</TextWithIOSLinkWorkaround>;
items2[2] = <View style={styles.blocks}>{value4()}</View>;
const view = <View style={styles.containerInner}>{items2}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={styles.container}>
{view}
<View style={styles.button} accessibilityRole="link">
<Button
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Yl/Riu'])}
onPress={(require(13935) /* metro dependency 13935: SupportUtils */).emailSupport}
/>
</View>
</View>
);
}
function _fun121930() { // fn#121930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1009, offset: 0x02554aec, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (importDefault(8961) /* metro dependency 8961: VerificationUtils */).getVerificationTypes(UserRequiredActionStore.getAction());
}
function _fun121931() { // fn#121931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1208, offset: 0x02554b20, size: 53 bytes, params: 1, frame: 15
return (
<>
{env0_1.map(_fun121932)}
</>
);
}
function _fun121932(a0) { // fn#121932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1233, offset: 0x02554b55, size: 265 bytes, params: 2, frame: 22
var environment;
var r0;
var object2;
var value2;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var intl;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
const CAPTCHA = VerificationTypes.CAPTCHA;
if (a0 === CAPTCHA) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3413d0'])} onPress={onPress_121933} grow />;
} else {
object2 = {};
value2 = environment.__proto__;
object2.style = styles.verificationType;
value = importDefault(8961) /* metro dependency 8961: VerificationUtils */;
value = <View {...object2} key={a0}><Button text={value.getButtonTitle(a0)} onPress={onPress_121935} grow /></View>;
r0 = value;
}
return r0;
}
function onPress_121933() { // fn#121933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1325, offset: 0x02554c5e, size: 56 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__.__proto__;
value = importDefault(15638) /* metro dependency 15638: CaptchaUtils */;
value = value.showCaptcha();
value.then(function(a0) {
var HTTP = require(dependencyMap[16]).HTTP;
HTTP.post({url: Endpoints.CAPTCHA, body: {captcha_key: a0}, oldFormErrors: true, rejectWithError: true});
});
}
function onPress_121935() { // fn#121935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16062:1568, offset: 0x02554cea, size: 189 bytes, params: 1, frame: 14
var r2;
var value6;
var currentUser;
const ADD_PHONE = VerificationModalScenes.ADD_PHONE;
const binding = env0_0;
const EMAIL_OR_PHONE = VerificationTypes.EMAIL_OR_PHONE;
if (binding !== EMAIL_OR_PHONE && env0_0 !== VerificationTypes.EMAIL && env0_0 !== VerificationTypes.REVERIFY_EMAIL) {
r2 = ADD_PHONE;
} else {
value6 = undefined;
(require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).accountDetailsInit();
currentUser = UserStore.getCurrentUser();
r2 = (currentUser == null ? value6 : currentUser.email) != null ? VerificationModalScenes.RESEND_EMAIL : VerificationModalScenes.ENTER_EMAIL;
}
env2_2.push(r2);
}