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

39 lines
3.0 KiB
TypeScript

/* Metro module 14214; source: modules/mfa/native/screens/MfaOptionScreen.tsx; dependencies: [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584, 2] */
function _fun107499(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14411:6, offset: 0x022fea71, size: 164 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = value.Fragment;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mfa/native/screens/MfaOptionScreen.tsx');
exports.default = MFAOptionScreen;
}
function MFAOptionScreen({headerText, headerImage, subtitle, input, submit, screenProps, mfaMethod, error, content}) { // fn#107500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14411:247, offset: 0x022feb15, size: 724 bytes, params: 2, frame: 36
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const value3 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
const value4 = (importDefault(14215) /* metro dependency 14215: MfaScreenUtils */).useScreenStyles(value3);
const value5 = screenProps.mfaChallenge.methods[0]?.type === mfaMethod;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const value6 = !value3;
const contentContainer = value4.contentContainer;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const mfaContainerHeader = value4.mfaContainerHeader;
const items2 = [headerImage != null && headerImage];
items2[1] = <Text variant="heading-xl/extrabold" style={value4.mfaContainerHeaderText}>{headerText}</Text>;
items2[2] = subtitle != null && <Text variant="heading-sm/normal" color="text-default">{subtitle}</Text>;
items2[3] = error != null && <Text variant="text-sm/normal" color="text-feedback-critical">{error}</Text>;
const safeAreaPaddingView = <SafeAreaPaddingView bottom={value6} top={value6} style={contentContainer}><Stack><Stack2 style={mfaContainerHeader} spacing={4}>{items2}</Stack2>{input}</Stack>{content}<Stack style={value4.submit}>{submit}{value5 && ((Component) => <Component props={screenProps} />)(importDefault(14216) /* metro dependency 14216: BackButton */)}</Stack></SafeAreaPaddingView>;
return (
<>
{((Component) => <Component backgroundImageCover={false} />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */)}
{value3 ? <ScrollView keyboardShouldPersistTaps="handled">{safeAreaPaddingView}</ScrollView> : safeAreaPaddingView}
</>
);
}