75 lines
4.3 KiB
TypeScript
75 lines
4.3 KiB
TypeScript
/* Metro module 14214; source: modules/mfa/native/screens/MfaOptionScreen.tsx; dependencies: [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584, 2] */
|
|
import UseWideAuthView from '../../../auth/native/useWideAuthView.tsx'; /* Metro dependency 8973 */
|
|
import MfaScreenUtils from '../MfaScreenUtils.tsx'; /* Metro dependency 14215 */
|
|
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
|
|
|
|
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});
|
|
(FileImportTrackerModule).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 = (TextModule).Text;
|
|
const value3 = (UseWideAuthView)();
|
|
const value4 = (MfaScreenUtils).useScreenStyles(value3);
|
|
const value5 = screenProps.mfaChallenge.methods[0]?.type === mfaMethod;
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
const value6 = !value3;
|
|
const contentContainer = value4.contentContainer;
|
|
const Stack = (StackNativeModule).Stack;
|
|
const Stack2 = (StackNativeModule).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
|
|
}
|
|
</>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun107499, 14214, [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584,
|
|
2]) /* metro module 14214, dependencies: [27, 33, 8973, 14215, 6618, 4572, 4573, 14216, 8584, 2] */;
|