decord/source/modules/mfa/native/screens/MfaOptionScreen.tsx

83 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 15498
// Function ID: 15499
2026-07-20 16:05:17 +00:00
// Name: MFAOptionScreen
2026-09-02 09:53:35 +00:00
// Dependencies: [19, 17, 21, 7726, 15499, 5561, 4926, 4474, 15500, 7757, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-09-02 09:53:35 +00:00
// Module 15498 (MFAOptionScreen)
2026-08-26 06:04:24 +00:00
import noopAll from "noop" /* 19 */;
2026-09-01 10:26:29 +00:00
import Text from "Text" /* 4474 */;
import Stack from "Stack" /* 4926 */;
2026-09-02 09:53:35 +00:00
import SafeAreaPaddingView from "SafeAreaPaddingView" /* 5561 */;
import useWideAuthViewDefault from "useWideAuthView" /* 7726 */;
import BackgroundImageDefault from "BackgroundImage" /* 7757 */;
import _modDef15499 from "module_15499" /* 15499 */;
2026-08-26 06:04:24 +00:00
import { ScrollView } from "get ActivityIndicator" /* 17 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-26 06:04:24 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c4, jsxs: c5, Fragment: closure_6 } = jsxProd);
2026-08-26 06:04:24 +00:00
const result = require("set").fileFinishedImporting("modules/mfa/native/screens/MfaOptionScreen.tsx");
2026-07-20 16:05:17 +00:00
export default function MFAOptionScreen(arg0) {
2026-09-02 09:53:35 +00:00
({ headerImage, subtitle, screenProps, error } = arg0);
2026-07-20 16:05:17 +00:00
({ headerText, input, submit, mfaMethod, content } = arg0);
2026-09-02 09:53:35 +00:00
const tmp3 = useWideAuthViewDefault();
let obj = _modDef15499;
const screenStyles = obj.useScreenStyles(tmp3);
const first = screenProps.mfaChallenge.methods[0];
2026-07-20 16:05:17 +00:00
let type;
2026-07-29 08:29:29 +00:00
if (first != null) {
2026-07-20 16:05:17 +00:00
type = first.type;
}
2026-09-02 09:53:35 +00:00
obj = { bottom: !tmp3, top: !tmp3, style: screenStyles.contentContainer, children: null };
2026-07-29 08:29:29 +00:00
obj = { style: screenStyles.mfaContainerHeader, spacing: 4, children: null };
let tmp9 = null != headerImage;
if (tmp9) {
tmp9 = headerImage;
2026-07-20 16:05:17 +00:00
}
2026-09-02 09:53:35 +00:00
const items = [tmp9, callback(Text.Heading, { variant: "heading-xl/extrabold", style: screenStyles.mfaContainerHeaderText, children: headerText }), , ];
2026-07-29 08:29:29 +00:00
let tmp10Result = null != subtitle;
if (tmp10Result) {
const obj2 = { variant: "heading-sm/normal", color: "text-default", children: null };
obj2[2] = subtitle;
2026-09-02 09:53:35 +00:00
tmp10Result = tmp10(tmp8(4474).Text, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[2] = tmp10Result;
tmp10Result = null != error;
if (tmp10Result) {
const obj3 = { variant: "text-sm/normal", color: "text-feedback-critical", children: null };
obj3[2] = error;
2026-09-02 09:53:35 +00:00
tmp10Result = tmp10(tmp8(4474).Text, obj3);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp10Result1 = type === mfaMethod;
const obj4 = { children: null };
items[3] = tmp10Result;
obj[2] = items;
2026-08-24 06:08:38 +00:00
const items1 = [closure_5(Stack.Stack, obj), input];
2026-07-29 08:29:29 +00:00
obj4[0] = items1;
2026-08-24 06:08:38 +00:00
const items2 = [closure_5(Stack.Stack, obj4), content, ];
2026-07-29 08:29:29 +00:00
const obj5 = { style: screenStyles.submit, children: null };
2026-07-20 16:05:17 +00:00
const items3 = [submit, ];
2026-07-29 08:29:29 +00:00
if (tmp10Result1) {
2026-09-02 09:53:35 +00:00
const obj6 = { props: null };
obj6[0] = screenProps;
tmp10Result1 = tmp10(tmp(15500), obj6);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[1] = tmp10Result1;
obj5[1] = items3;
2026-08-24 06:08:38 +00:00
items2[2] = closure_5(Stack.Stack, obj5);
2026-07-29 08:29:29 +00:00
obj[3] = items2;
2026-09-02 09:53:35 +00:00
const tmp7Result = closure_5(SafeAreaPaddingView.SafeAreaPaddingView, obj);
2026-08-24 06:08:38 +00:00
const children = [callback(BackgroundImageDefault, { backgroundImageCover: false }), ];
2026-09-02 09:53:35 +00:00
let tmp10Result2 = tmp7Result;
if (tmp3) {
const obj7 = { keyboardShouldPersistTaps: "handled", children: null };
obj7[1] = tmp7Result;
tmp10Result2 = tmp10(ScrollView, obj7);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
children[1] = tmp10Result2;
return closure_5(closure_6, { children });
2026-07-20 16:05:17 +00:00
};