decord/source/modules/verification/native/components/VerificationModal.tsx

235 lines
12 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 16729
// Function ID: 16730
2026-07-20 16:05:17 +00:00
// Name: PhoneThenEmailInterstitial
2026-08-15 05:55:55 +00:00
// Dependencies: [5, 19, 17, 16730, 1385, 1922, 676, 21, 4661, 1297, 16731, 1236, 4745, 1501, 503, 6314, 5432, 8904, 7172, 5256, 16735, 8568, 8573, 8570, 8618, 8628, 8629, 8569, 16736, 8655, 8623, 589, 4342, 4237, 6312, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 16729 (PhoneThenEmailInterstitial)
2026-07-29 08:29:29 +00:00
import mergeGuildAvatar from "mergeGuildAvatar";
2026-08-06 08:05:19 +00:00
import handleLogout from "handleLogout";
import { View } from "registerAsset";
2026-07-29 08:29:29 +00:00
import getCountrySelectorOpened from "getCountrySelectorOpened";
import handleRequiredAction from "handleRequiredAction";
import closure_8 from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-08-06 08:05:19 +00:00
import { jsx } from "ResendEmail";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c10;
let c9;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function PhoneThenEmailInterstitial(navigation) {
2026-07-23 10:11:24 +00:00
navigation = navigation.navigation;
2026-07-29 08:29:29 +00:00
let obj = { Illustration: null, title: null, body: null, children: null };
2026-08-15 05:55:55 +00:00
obj[0] = navigation(16731).VerifyPhone;
2026-07-29 08:29:29 +00:00
const intl = navigation(1236).intl;
obj[1] = intl.string(navigation(1236).t.KLnLIP);
const intl2 = navigation(1236).intl;
obj[2] = intl2.string(navigation(1236).t.XGbCq3);
obj = { style: callback().button, children: null };
obj = { text: null, onPress: null };
const intl3 = navigation(1236).intl;
obj[0] = intl3.string(navigation(1236).t["3oK4qw"]);
obj[1] = function onPress() {
2026-07-23 10:11:24 +00:00
const currentUser = outer1_8.getCurrentUser();
2026-07-20 16:05:17 +00:00
let email;
2026-07-29 08:29:29 +00:00
if (currentUser != null) {
2026-07-20 16:05:17 +00:00
email = currentUser.email;
}
if (null != email) {
2026-07-23 10:11:24 +00:00
let ENTER_EMAIL = outer1_10.RESEND_EMAIL;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
ENTER_EMAIL = outer1_10.ENTER_EMAIL;
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
const StackActions = navigation(outer1_2[13]).StackActions;
navigation.dispatch(StackActions.push(ENTER_EMAIL));
2026-07-20 16:05:17 +00:00
};
2026-08-15 05:55:55 +00:00
obj[1] = jsx(navigation(4745).Button, { text: null, onPress: null });
2026-07-29 08:29:29 +00:00
obj[3] = <View text={null} onPress={null} />;
return jsx(navigation(1297).EmptyState, { text: null, onPress: null });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ UserRequiredActions: c9, VerificationModalScenes: c10 } = ME);
let closure_12 = createCacheKey.createStyles({ button: { position: "absolute", right: 32, bottom: 32, left: 32 } });
2026-07-23 10:11:24 +00:00
let result = require("get ActivityIndicator").fileFinishedImporting("modules/verification/native/components/VerificationModal.tsx");
2026-07-20 16:05:17 +00:00
export default function VerificationModal() {
2026-07-29 08:29:29 +00:00
let obj = stateFromStores(589);
let items = [getCountrySelectorOpened];
stateFromStores = obj.useStateFromStores(items, () => countrySelectorOpened.getCountrySelectorOpened());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores];
const memo = React.useMemo(() => {
2026-07-23 10:11:24 +00:00
let obj = { name: outer1_10.OVERVIEW };
2026-07-20 16:05:17 +00:00
const items = [obj];
if (stateFromStores) {
2026-07-29 08:29:29 +00:00
obj = { name: null };
obj[0] = tmp.ADD_PHONE;
2026-07-20 16:05:17 +00:00
items.push(obj);
}
return items;
}, items1);
const effect = React.useEffect(() => {
2026-08-15 05:55:55 +00:00
callback(4342).hideActionSheet();
const obj = callback(4342);
stateFromStores(4237).dismissKeyboard();
2026-07-20 16:05:17 +00:00
}, []);
2026-07-29 08:29:29 +00:00
obj = { screens: null, initialRouteStack: null, headerBackTitle: null };
obj[0] = React.useMemo(() => {
let obj = {};
obj = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
obj = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.CHANGE_EMAIL_COLLECT_REASONS };
obj[1] = obj;
2026-08-15 05:55:55 +00:00
let obj3 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj[2] = obj3.getHeaderNoTitle();
obj[3] = function render() {
return null;
};
obj[constants.CHANGE_EMAIL_COLLECT_REASONS] = obj;
let obj1 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
obj1[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.CHANGE_EMAIL_WARNING };
2026-08-15 05:55:55 +00:00
let obj6 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj1[2] = obj6.getHeaderNoTitle();
obj1[3] = function render() {
return null;
};
obj[constants.CHANGE_EMAIL_WARNING] = obj1;
obj3 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, gestureEnabled: false, headerLeft: null, headerTitle: null, headerRight: null, render: null };
let obj2 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.CHANGE_EMAIL_WARNING };
obj3[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.OVERVIEW };
obj3[3] = function headerLeft() {
return null;
};
2026-08-15 05:55:55 +00:00
let obj9 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj3[4] = obj9.getHeaderNoTitle();
obj3[5] = function headerRight() {
let obj = { source: null, accessibilityLabel: null, onPress: null };
2026-08-15 05:55:55 +00:00
obj[0] = callback2(8904);
2026-07-29 08:29:29 +00:00
let intl = callback(1236).intl;
obj[1] = intl.string(callback(1236).t.PdRCRg);
obj[2] = function onPress() {
2026-08-15 05:55:55 +00:00
let obj = callback(7172);
2026-07-29 08:29:29 +00:00
obj = { key: "VerificationOverviewMore", options: null, hasIcons: false };
obj = { label: null, isDestructive: true, onPress: null };
const intl = callback(1236).intl;
obj[0] = intl.string(callback(1236).t["2jxGer"]);
obj[2] = function onPress() {
2026-08-06 08:05:19 +00:00
return callback(table[19]).logout("verification_modal");
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
const items = [obj];
obj[1] = items;
const result = obj.showSimpleActionSheet(obj);
};
2026-08-15 05:55:55 +00:00
return callback3(callback(5432).HeaderActionButton, obj);
2026-07-29 08:29:29 +00:00
};
obj3[6] = function render() {
2026-08-15 05:55:55 +00:00
return callback3(callback2(16735), {});
2026-07-29 08:29:29 +00:00
};
obj[constants.OVERVIEW] = obj3;
let obj5 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
obj6 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.RESEND_EMAIL };
obj5[1] = obj6;
2026-08-15 05:55:55 +00:00
let obj12 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj5[2] = obj12.getHeaderNoTitle();
obj5[3] = function render() {
2026-08-15 05:55:55 +00:00
return callback3(callback2(8568), {});
2026-07-29 08:29:29 +00:00
};
obj[constants.RESEND_EMAIL] = obj5;
const obj7 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
let obj4 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.OVERVIEW };
obj7[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.RESEND_EMAIL };
2026-08-15 05:55:55 +00:00
let obj15 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj7[2] = obj15.getHeaderNoTitle();
obj7[3] = function render() {
2026-08-15 05:55:55 +00:00
return callback3(callback2(8568), {});
2026-07-29 08:29:29 +00:00
};
obj[constants.CHANGE_EMAIL_COMPLETE] = obj7;
obj9 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
const obj8 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.RESEND_EMAIL };
obj9[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.CONFIRM_EMAIL_CHANGE_CODE };
2026-08-15 05:55:55 +00:00
let obj18 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj9[2] = obj18.getHeaderNoTitle();
obj9[3] = function render() {
2026-08-15 05:55:55 +00:00
return callback3(callback2(8573), { isChangeEmail: false });
2026-07-29 08:29:29 +00:00
};
obj[constants.CONFIRM_EMAIL_CHANGE_CODE] = obj9;
const obj11 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
obj12 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.CONFIRM_EMAIL_CHANGE_START };
obj11[1] = obj12;
2026-08-15 05:55:55 +00:00
let obj21 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj11[2] = obj21.getHeaderNoTitle();
obj11[3] = function render() {
2026-08-15 05:55:55 +00:00
return callback3(callback2(8570), {});
2026-07-29 08:29:29 +00:00
};
obj[constants.CONFIRM_EMAIL_CHANGE_START] = obj11;
const obj13 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
let obj10 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.CONFIRM_EMAIL_CHANGE_CODE };
obj13[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.ENTER_EMAIL };
const obj14 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.ENTER_EMAIL };
2026-08-15 05:55:55 +00:00
obj13[2] = stateFromStores(6314).getHeaderNoTitle();
2026-07-29 08:29:29 +00:00
obj13[3] = function render() {
2026-08-15 05:55:55 +00:00
return callback3(callback2(8618), { isChangeEmail: false });
2026-07-29 08:29:29 +00:00
};
obj[constants.ENTER_EMAIL] = obj13;
obj15 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
2026-08-15 05:55:55 +00:00
const obj25 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj15[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.ADD_PHONE };
const obj16 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.ADD_PHONE };
2026-08-15 05:55:55 +00:00
obj15[2] = stateFromStores(6314).getHeaderNoTitle();
2026-07-29 08:29:29 +00:00
obj15[3] = function render(arg0, arg1) {
let callback = arg1;
2026-07-23 10:11:24 +00:00
let obj = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(arg0);
2026-08-15 05:55:55 +00:00
obj.reason = callback(8629).ChangePhoneReason.USER_ACTION_REQUIRED;
2026-07-29 08:29:29 +00:00
obj.onComplete = function onComplete(phone) {
return arr.push(outer1_10.VERIFY_PHONE, {
phone,
onVerified(arg0) {
let arr = arg0;
let obj = { hideUnverifiedBanner: true, onSubmit: null, onSuccess: null };
2026-08-15 05:55:55 +00:00
let closure_2 = outer1_3(/* F120940 */ function() { ... });
2026-07-29 08:29:29 +00:00
obj[1] = () => { ... };
2026-08-15 05:55:55 +00:00
let closure_1 = outer1_3(/* F120942 */ function() { ... });
2026-07-29 08:29:29 +00:00
obj[2] = () => { ... };
arr = arr.push(outer1_10.VERIFY_PASSWORD, obj);
}
});
};
2026-08-15 05:55:55 +00:00
return callback3(callback2(8628), obj);
2026-07-29 08:29:29 +00:00
};
obj[constants.ADD_PHONE] = obj15;
const obj17 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
obj18 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.VERIFY_PHONE };
obj17[1] = obj18;
2026-08-15 05:55:55 +00:00
const obj28 = stateFromStores(6314);
obj17[2] = stateFromStores(6314).getHeaderNoTitle();
2026-07-29 08:29:29 +00:00
obj17[3] = function render(arg0) {
const merged = Object.assign(arg0);
2026-08-15 05:55:55 +00:00
return callback3(callback2(8655), { disableKeyboardAvoidingView: true });
2026-07-29 08:29:29 +00:00
};
obj[constants.VERIFY_PHONE] = obj17;
const obj19 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
2026-08-15 05:55:55 +00:00
const obj31 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj19[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.VERIFY_PASSWORD };
const obj20 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.VERIFY_PASSWORD };
2026-08-15 05:55:55 +00:00
obj19[2] = stateFromStores(6314).getHeaderNoTitle();
2026-07-29 08:29:29 +00:00
obj19[3] = function render(arg0) {
const merged = Object.assign(arg0);
2026-08-15 05:55:55 +00:00
return callback3(callback2(8623), {});
2026-07-29 08:29:29 +00:00
};
obj[constants.VERIFY_PASSWORD] = obj19;
obj21 = { impressionName: stateFromStores(503).ImpressionNames.USER_VERIFICATION_MODAL, impressionProperties: null, headerTitle: null, render: null };
2026-08-15 05:55:55 +00:00
const obj34 = stateFromStores(6314);
2026-07-29 08:29:29 +00:00
obj21[1] = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.PHONE_THEN_EMAIL_INTERSTITIAL };
const obj22 = { impression_group: stateFromStores(503).ImpressionGroups.USER_VERIFICATION_MODAL_FLOW, step: constants.PHONE_THEN_EMAIL_INTERSTITIAL };
2026-08-15 05:55:55 +00:00
obj21[2] = stateFromStores(6314).getHeaderNoTitle();
2026-07-29 08:29:29 +00:00
obj21[3] = function render(arg0, navigation) {
return callback3(closure_13, { navigation });
};
obj[constants.PHONE_THEN_EMAIL_INTERSTITIAL] = obj21;
return obj;
}, []);
obj[1] = memo;
let intl = stateFromStores(1236).intl;
obj[2] = intl.string(stateFromStores(1236).t["13/7kX"]);
2026-08-15 05:55:55 +00:00
return jsx(stateFromStores(6312).Navigator, { screens: null, initialRouteStack: null, headerBackTitle: null });
2026-07-20 16:05:17 +00:00
};