decord/source/modules/hub/native/components/HubEmailConnectionSubmitSchool.tsx

222 lines
8.2 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12292
// Function ID: 12293
2026-07-20 16:05:17 +00:00
// Name: HubEmailConnectionSubmitSchool
2026-08-25 06:04:03 +00:00
// Dependencies: [5, 32, 19, 17, 12275, 676, 21, 4380, 712, 1500, 5475, 12288, 4278, 12283, 1297, 1236, 4376, 8622, 4815, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 12292 (HubEmailConnectionSubmitSchool)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import Button from "Button" /* 1297 */;
import useNavigation from "useNavigation" /* 1500 */;
2026-08-25 06:04:03 +00:00
import Text from "Text" /* 4376 */;
import Button2 from "Button" /* 4815 */;
import useSafeAreaInsetsKeyboardAwareDefault from "useSafeAreaInsetsKeyboardAware" /* 5475 */;
import _modDef8622 from "module_8622" /* 8622 */;
import HubEmailConnectionModal from "HubEmailConnectionModal" /* 12283 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "_slicedToArray" /* 32 */;
import closure_5 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import { HubEmailConnectionSteps } from "HubEmailConnectionSteps" /* 12275 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
({ View: closure_6, ScrollView: error } = get_ActivityIndicator);
({ jsx: c9, jsxs: c10 } = jsxProd);
createCacheKey = { container: { paddingHorizontal: 16 }, title: null, description: null, scrollViewContainer: null, input: null, redesignTextInput: null, redesignGrowSpacing: null, redesignSubmit: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { fontFamily: require("ME").Fonts.PRIMARY_BOLD, color: ThemesDefault.colors.MOBILE_TEXT_HEADING_PRIMARY, fontSize: 24, textAlign: "center", marginBottom: 8 };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
createCacheKey[2] = { textAlign: "center", marginBottom: 24 };
createCacheKey[3] = { flexGrow: 2 };
createCacheKey[4] = { marginBottom: 8 };
2026-08-24 06:08:38 +00:00
createCacheKey[5] = { borderRadius: ThemesDefault.radii.lg };
let obj1 = { borderRadius: ThemesDefault.radii.lg };
createCacheKey[6] = { flexGrow: 2, minHeight: ThemesDefault.space.PX_24 };
let obj2 = { flexGrow: 2, minHeight: ThemesDefault.space.PX_24 };
createCacheKey[7] = { paddingHorizontal: ThemesDefault.space.PX_16 };
let closure_11 = createCacheKey.createStyles(createCacheKey);
let obj3 = { paddingHorizontal: ThemesDefault.space.PX_16 };
const result = require("set").fileFinishedImporting("modules/hub/native/components/HubEmailConnectionSubmitSchool.tsx");
2026-07-20 16:05:17 +00:00
export default function HubEmailConnectionSubmitSchool(arg0) {
2026-07-23 10:11:24 +00:00
({ onClose: require, email: importDefault } = arg0);
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
closure_3 = undefined;
2026-07-20 16:05:17 +00:00
let callback;
2026-07-29 08:29:29 +00:00
let ref;
2026-07-20 16:05:17 +00:00
let first;
function _submitWaitlist() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback(function*() {
if (c5 === 2) {
c5 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp7 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-25 06:04:03 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2;
if (0 === v02) {
if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 === 2) {
c5 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_1 = tmp4;
let callback = tmp8;
2026-07-29 08:29:29 +00:00
v02(null);
let v0 = 2;
v0(true);
2026-08-24 06:08:38 +00:00
let obj2 = closure_1_1(closure_1_2[11]);
2026-07-29 08:29:29 +00:00
v02 = 3;
c5 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
obj1[0] = obj2.signup(closure_1_1, closure_1_6);
2026-07-29 08:29:29 +00:00
return obj1;
}
} else if (1 === tmp8) {
v0 = 0;
v0(false);
throw arr;
} else {
if (2 === tmp8) {
v0 = 1;
2026-08-24 06:08:38 +00:00
callback = arr;
const aPIError = new callback(closure_1_2[12]).APIError(callback);
2026-07-29 08:29:29 +00:00
v02(aPIError);
v0 = 0;
v0(false);
c5 = 3;
} else if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 !== 2) {
obj = { school: null, onClose: null };
obj[0] = closure_6;
2026-08-24 06:08:38 +00:00
obj[1] = callback;
arr = arr.push(closure_1_8.EMAIL_WAITLIST, obj);
2026-07-29 08:29:29 +00:00
v0 = 1;
}
v0 = 0;
v0(false);
c5 = 3;
obj2 = { value: null, done: true };
obj2[0] = arg1;
return obj2;
}
} catch (tmp47) {
arr = tmp47;
if (tmp5 === v0) {
c5 = tmp3;
throw tmp47;
} else if (tmp2 === tmp49) {
v02 = tmp2;
} else {
v02 = tmp;
}
}
}
});
2026-08-24 06:08:38 +00:00
closure_7 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
let tmp = callback3();
let obj = useNavigation;
2026-07-23 10:11:24 +00:00
dependencyMap = obj.useNavigation();
2026-07-29 08:29:29 +00:00
const tmp4 = callback(ref.useState(false), 2);
2026-08-24 06:08:38 +00:00
closure_3 = tmp4[1];
2026-07-23 10:11:24 +00:00
[obj2, c4] = callback(ref.useState(null), 2);
ref = ref.useRef(null);
2026-07-29 08:29:29 +00:00
const tmp7 = callback(ref.useState(""), 2);
first = tmp7[0];
obj = { ref, contentContainerStyle: null, children: null };
2026-07-20 16:05:17 +00:00
const items = [tmp.scrollViewContainer, ];
2026-08-24 06:08:38 +00:00
obj = { paddingBottom: useSafeAreaInsetsKeyboardAwareDefault().insets.bottom + ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
items[1] = obj;
obj[1] = items;
2026-08-24 06:08:38 +00:00
obj1 = { style: tmp.container, children: null };
2026-07-29 08:29:29 +00:00
obj2 = { style: tmp.title, accessibilityRole: "header", children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj2[2] = intl.string(getSystemLocale.t["2FNWBG"]);
const items1 = [callback2(Button.LegacyText, obj2), , ];
2026-07-29 08:29:29 +00:00
const obj3 = { style: tmp.description, variant: "text-sm/medium", color: "text-default", children: null };
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
obj3[3] = intl2.string(getSystemLocale.t["/4y6ox"]);
items1[1] = callback2(Text.Text, obj3);
2026-07-29 08:29:29 +00:00
const obj4 = { label: null, placeholder: null, value: null, onChangeText: null, style: null, textStyle: null, clearButtonVisibility: null, error: null, onFocus: null, onBlur: null };
const tmp11 = _submitWaitlist;
const tmp5 = callback(ref.useState(null), 2);
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj4[0] = intl3.string(getSystemLocale.t["L+AfJr"]);
const intl4 = getSystemLocale.intl;
obj4[1] = intl4.string(getSystemLocale.t.Y1btJd);
2026-07-29 08:29:29 +00:00
obj4[2] = first;
obj4[3] = tmp7[1];
({ input: obj8[4], redesignTextInput: obj8[5] } = tmp);
2026-08-24 06:08:38 +00:00
obj4[6] = Button.ClearButtonVisibility.WITH_CONTENT;
2026-07-20 16:05:17 +00:00
let anyErrorMessage;
2026-07-29 08:29:29 +00:00
if (obj1 != null) {
2026-07-20 16:05:17 +00:00
anyErrorMessage = obj1.getAnyErrorMessage();
}
2026-07-29 08:29:29 +00:00
const obj5 = { children: null };
obj4[7] = anyErrorMessage;
obj4[8] = function onFocus() {
2026-07-20 16:05:17 +00:00
const timerId = setTimeout(() => {
2026-07-29 08:29:29 +00:00
const current = ref.current;
if (current != null) {
2026-07-20 16:05:17 +00:00
current.scrollToEnd();
}
}, 100);
};
2026-07-29 08:29:29 +00:00
obj4[9] = function onBlur() {
2026-07-20 16:05:17 +00:00
const timerId = setTimeout(() => {
2026-07-29 08:29:29 +00:00
const current = ref.current;
if (current != null) {
2026-07-20 16:05:17 +00:00
current.scrollToEnd();
}
}, 100);
};
2026-08-25 06:04:03 +00:00
items1[2] = callback2(_modDef8622, obj4);
2026-07-29 08:29:29 +00:00
obj1[1] = items1;
const items2 = [closure_10(first, obj1), callback2(first, { style: tmp.redesignGrowSpacing }), ];
const obj7 = { style: tmp.redesignSubmit, children: null };
const obj8 = { size: "lg", loading: tmp4[0], text: null, onPress: null };
const intl5 = tmp2(1236).intl;
2026-08-24 06:08:38 +00:00
obj8[2] = intl5.string(getSystemLocale.t.PDsYAo);
2026-07-29 08:29:29 +00:00
obj8[3] = function submitWaitlist() {
const self = this;
const apply = _submitWaitlist.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj7[1] = callback2(Button2.Button, obj8);
2026-07-20 16:05:17 +00:00
items2[2] = callback2(first, obj7);
2026-07-29 08:29:29 +00:00
obj[2] = items2;
obj5[0] = closure_10(tmp11, obj);
2026-08-24 06:08:38 +00:00
return callback2(HubEmailConnectionModal.HubEmailConnectionScreen, obj5);
2026-07-20 16:05:17 +00:00
};