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

152 lines
6.7 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 11814
// Function ID: 91565
2026-07-20 16:05:17 +00:00
// Name: HubEmailConnectionGuildSelectRow
2026-07-28 08:39:19 +00:00
// Dependencies: [5, 57, 31, 27, 11796, 33, 4165, 689, 7611, 5548, 1387, 4161, 1212, 1557, 4578, 1273, 1456, 6731, 8270, 11809, 4064, 11804, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-28 08:39:19 +00:00
// Module 11814 (HubEmailConnectionGuildSelectRow)
2026-07-23 10:11:24 +00:00
import closure_3 from "jsxProd";
import _slicedToArray from "_slicedToArray";
import result from "result";
import get_ActivityIndicator from "get ActivityIndicator";
import { HubEmailConnectionSteps } from "HubEmailConnectionSteps";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_10;
let closure_6;
let closure_7;
let closure_9;
const require = arg1;
2026-07-20 16:05:17 +00:00
class HubEmailConnectionGuildSelectRow {
constructor(arg0) {
guildInfo = global.guildInfo;
({ signup, loading } = global);
2026-07-23 10:11:24 +00:00
tmp = c11();
2026-07-20 16:05:17 +00:00
obj = { onPress: signup, disabled: loading, DEPRECATED_style: tmp.rowContainer, label: guildInfo.name };
obj = { style: tmp.guildIcon };
2026-07-23 10:11:24 +00:00
tmp2 = require("makeSizeStyle");
obj3 = require("fromGuildPropertiesWithAdditionalFields");
2026-07-20 16:05:17 +00:00
obj1 = {};
merged = Object.assign(guildInfo);
obj1["features"] = [];
obj.guild = obj3.fromGuildBasic(obj1);
obj.leading = jsx(tmp2, obj);
2026-07-23 10:11:24 +00:00
obj.trailing = jsx(require("Form").FormRow.Arrow, {});
return jsx(require("Form").FormRow, obj);
2026-07-20 16:05:17 +00:00
}
}
function HubEmailConnectionGuildSelectHeader() {
2026-07-23 10:11:24 +00:00
const tmp = _createForOfIteratorHelperLoose();
2026-07-20 16:05:17 +00:00
let obj = { style: tmp.header };
2026-07-23 10:11:24 +00:00
obj = { style: tmp.title, accessibilityRole: "header", variant: "heading-xl/extrabold", color: "mobile-text-heading-primary" };
const intl = require(1212) /* getSystemLocale */.intl;
obj.children = intl.string(require(1212) /* getSystemLocale */.t.mOMeiR);
2026-07-28 08:39:19 +00:00
obj.children = callback(require(4161) /* Text */.Text, obj);
2026-07-23 10:11:24 +00:00
return callback(closure_6, obj);
2026-07-20 16:05:17 +00:00
}
function HubEmailConnectionGuildSelectFooter(onFooterButtonPressed) {
let errors;
let loading;
({ errors, loading } = onFooterButtonPressed);
2026-07-23 10:11:24 +00:00
const tmp = _createForOfIteratorHelperLoose();
2026-07-20 16:05:17 +00:00
let obj = {};
const items = [tmp.footerSafeAreaContainer, ];
2026-07-23 10:11:24 +00:00
obj = { paddingBottom: importDefault(1557)().bottom };
2026-07-20 16:05:17 +00:00
items[1] = obj;
obj.style = items;
obj = { style: tmp.footerContainer };
const obj1 = { variant: "secondary", loading, disabled: loading, grow: true };
2026-07-23 10:11:24 +00:00
const intl = require(1212) /* getSystemLocale */.intl;
obj1.text = intl.string(require(1212) /* getSystemLocale */.t.G3Zk7V);
2026-07-20 16:05:17 +00:00
obj1.onPress = onFooterButtonPressed.onFooterButtonPressed;
2026-07-28 08:39:19 +00:00
const items1 = [callback(require(4578) /* Button */.Button, obj1), ];
2026-07-20 16:05:17 +00:00
let tmp7Result = null != errors;
if (tmp7Result) {
const obj2 = { style: tmp.error };
let anyErrorMessage;
if (null != errors) {
anyErrorMessage = errors.getAnyErrorMessage();
}
obj2.children = anyErrorMessage;
2026-07-23 10:11:24 +00:00
tmp7Result = callback(require(1273) /* Button */.LegacyText, obj2);
const tmp7 = callback;
2026-07-20 16:05:17 +00:00
}
items1[1] = tmp7Result;
obj.children = items1;
obj.children = closure_10(closure_6, obj);
2026-07-23 10:11:24 +00:00
return callback(closure_6, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
({ View: closure_6, FlatList: closure_7 } = get_ActivityIndicator);
({ jsx: closure_9, jsxs: closure_10 } = jsxProd);
_createForOfIteratorHelperLoose = {};
_createForOfIteratorHelperLoose = { marginHorizontal: 16, borderRadius: require("_createForOfIteratorHelperLoose").radii.sm, padding: 12, backgroundColor: require("_createForOfIteratorHelperLoose").colors.BACKGROUND_MOD_NORMAL };
_createForOfIteratorHelperLoose.rowContainer = _createForOfIteratorHelperLoose;
_createForOfIteratorHelperLoose.guildIcon = { borderRadius: require("_createForOfIteratorHelperLoose").radii.sm };
_createForOfIteratorHelperLoose.separator = { height: 8 };
_createForOfIteratorHelperLoose.header = { padding: 16, alignItems: "center", justifyContent: "center" };
_createForOfIteratorHelperLoose.title = { marginBottom: 8, textAlign: "center" };
let obj2 = { backgroundColor: require("_createForOfIteratorHelperLoose").colors.BACKGROUND_BASE_LOW, position: "absolute", bottom: 0, width: "100%" };
_createForOfIteratorHelperLoose.footerSafeAreaContainer = obj2;
_createForOfIteratorHelperLoose.footerContainer = { paddingHorizontal: 16, height: 110, justifyContent: "center", alignItems: "center" };
const obj3 = { color: require("_createForOfIteratorHelperLoose").unsafe_rawColors.RED_400, alignSelf: "center", fontSize: 14, marginVertical: 8 };
_createForOfIteratorHelperLoose.error = obj3;
_createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose.createStyles(_createForOfIteratorHelperLoose);
let obj1 = { borderRadius: require("_createForOfIteratorHelperLoose").radii.sm };
const result = require("result").fileFinishedImporting("modules/hub/native/components/HubEmailConnectionGuildSelect.tsx");
2026-07-20 16:05:17 +00:00
export default function HubEmailConnectionGuildSelect(onClose) {
onClose = onClose.onClose;
const email = onClose.email;
const guildsInfo = onClose.guildsInfo;
2026-07-23 10:11:24 +00:00
let closure_3 = _createForOfIteratorHelperLoose();
let obj = onClose(guildsInfo[16]);
2026-07-20 16:05:17 +00:00
const navigation = obj.useNavigation();
const items = [email, guildsInfo, navigation, onClose];
const layoutEffect = React.useLayoutEffect(() => {
navigation.setOptions({
headerRight() {
const obj = {
2026-07-23 10:11:24 +00:00
IconComponent: onClose(guildsInfo[18]).MagnifyingGlassIcon,
2026-07-20 16:05:17 +00:00
onPress() {
2026-07-23 10:11:24 +00:00
outer2_4.push(outer3_8.SELECT_SCHOOL_SEARCH, { email: outer2_1, onClose: outer2_0, guildsInfo: outer2_2 });
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
const intl = onClose(guildsInfo[12]).intl;
obj.accessibilityLabel = intl.string(onClose(guildsInfo[12]).t["5h0QOP"]);
return outer2_9(onClose(guildsInfo[17]).HeaderActionButton, obj);
2026-07-20 16:05:17 +00:00
}
});
}, items);
const items1 = [email, navigation, onClose];
2026-07-23 10:11:24 +00:00
const callback = React.useCallback(() => {
navigation.push(outer1_8.SUBMIT_SCHOOL, { email, onClose });
2026-07-20 16:05:17 +00:00
}, items1);
2026-07-23 10:11:24 +00:00
const tmp4 = navigation(React.useState(null), 2);
React = tmp4[1];
const tmp5 = navigation(React.useState(false), 2);
2026-07-20 16:05:17 +00:00
const first = tmp5[0];
let closure_7 = tmp5[1];
obj = {};
obj = {
data: guildsInfo,
ListHeaderComponent() {
2026-07-23 10:11:24 +00:00
return outer1_9(outer1_13, {});
2026-07-20 16:05:17 +00:00
},
renderItem(item) {
item = item.item;
2026-07-23 10:11:24 +00:00
const id = item.id;
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
return outer1_9(outer1_12, { guildInfo: item, signup: lib(tmp), loading: first });
2026-07-20 16:05:17 +00:00
},
ItemSeparatorComponent() {
2026-07-23 10:11:24 +00:00
return outer1_9(first, { style: lib.separator });
2026-07-20 16:05:17 +00:00
},
contentContainerStyle: obj1
};
2026-07-23 10:11:24 +00:00
const items2 = [callback(closure_7, obj), callback(HubEmailConnectionGuildSelectFooter, { errors: tmp4[0], loading: first, onFooterButtonPressed: callback })];
2026-07-20 16:05:17 +00:00
obj.children = items2;
2026-07-23 10:11:24 +00:00
return callback2(onClose(guildsInfo[21]).HubEmailConnectionScreen, obj);
2026-07-20 16:05:17 +00:00
};
export { HubEmailConnectionGuildSelectRow };