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

214 lines
7.7 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 12503
// Function ID: 12504
2026-07-20 16:05:17 +00:00
// Name: EmptyState
2026-09-02 09:53:35 +00:00
// Dependencies: [5, 32, 19, 17, 12481, 21, 4478, 709, 12504, 4474, 1233, 1498, 5462, 1627, 12494, 4376, 5503, 6229, 1296, 12499, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-09-02 09:53:35 +00:00
// Module 12503 (EmptyState)
import ThemesDefault from "Themes" /* 709 */;
import getSystemLocale from "getSystemLocale" /* 1233 */;
import useNavigation from "useNavigation" /* 1498 */;
2026-09-01 10:26:29 +00:00
import Text from "Text" /* 4474 */;
2026-09-02 09:53:35 +00:00
import HeaderBackImage from "HeaderBackImage" /* 5503 */;
import _modDef6229 from "module_6229" /* 6229 */;
import registerAssetDefault from "registerAsset" /* 12504 */;
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-09-02 09:53:35 +00:00
import { HubEmailConnectionSteps } from "HubEmailConnectionSteps" /* 12481 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-09-01 10:26:29 +00:00
import createCacheKey from "createCacheKey" /* 4478 */;
2026-07-21 06:55:02 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function EmptyState() {
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.emptyWrapper, children: null };
2026-08-24 06:08:38 +00:00
obj = { style: tmp.emptyStateImage, source: registerAssetDefault };
2026-07-20 16:05:17 +00:00
const items = [callback2(closure_7, obj), ];
2026-07-29 08:29:29 +00:00
obj = { style: tmp.emptyStateTitle, variant: "text-sm/semibold", color: "mobile-text-heading-primary", children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[3] = intl.string(getSystemLocale.t["6HXiuE"]);
items[1] = callback2(Text.Text, obj);
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return callback3(closure_6, obj);
}
2026-08-24 06:08:38 +00:00
({ View: closure_6, Image: error, FlatList: closure_8 } = get_ActivityIndicator);
2026-07-29 08:29:29 +00:00
({ jsx: c10, jsxs: unpackModuleId, Fragment: closure_12 } = jsxProd);
createCacheKey = { scrollContainer: null, fauxHeader: null, emptyWrapper: null, emptyStateImage: null, emptyStateTitle: null, error: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flex: 1, width: "100%", backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { paddingHorizontal: 0 };
createCacheKey[2] = { flex: 1, alignItems: "center", justifyContent: "center", marginTop: 64, paddingHorizontal: 16 };
createCacheKey[3] = { marginBottom: 24 };
createCacheKey[4] = { marginBottom: 4, textAlign: "center" };
2026-08-24 06:08:38 +00:00
createCacheKey[5] = { color: ThemesDefault.unsafe_rawColors.RED_400, alignSelf: "center", fontSize: 14, marginBottom: 8 };
let closure_13 = createCacheKey.createStyles(createCacheKey);
let obj1 = { color: ThemesDefault.unsafe_rawColors.RED_400, alignSelf: "center", fontSize: 14, marginBottom: 8 };
const result = require("set").fileFinishedImporting("modules/hub/native/components/HubEmailConnectionGuildSelectSearch.tsx");
2026-07-20 16:05:17 +00:00
export default function HubEmailConnectionGuildSelectSearch(arg0) {
2026-07-23 10:11:24 +00:00
({ guildsInfo, email: require, onClose: importDefault } = arg0);
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
closure_3 = undefined;
2026-07-29 08:29:29 +00:00
let callback;
let React;
c6 = undefined;
c7 = undefined;
2026-07-20 16:05:17 +00:00
let anyErrorMessage;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
dependencyMap = tmp;
2026-08-24 06:08:38 +00:00
let obj = useNavigation;
2026-07-29 08:29:29 +00:00
closure_3 = obj.useNavigation();
const tmp4 = callback(React.useState(""), 2);
callback = tmp4[0];
[obj2, c5] = callback(React.useState(null), 2);
const tmp5 = callback(React.useState(null), 2);
[c6, c7] = callback(React.useState(false), 2);
2026-07-20 16:05:17 +00:00
const found = guildsInfo.filter((name) => {
2026-08-24 06:08:38 +00:00
const formatted = closure_4.toLowerCase();
return closure_1_1(error[12])(formatted, name.name.toLowerCase());
2026-07-20 16:05:17 +00:00
});
anyErrorMessage = undefined;
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
obj = { children: null };
obj = { style: tmp.fauxHeader, children: null };
obj1 = { placeholder: null, onChange: null, onClose: null };
const tmp6 = callback(React.useState(false), 2);
const tmp8 = importDefault;
2026-09-02 09:53:35 +00:00
const intl = tmp2(1233).intl;
2026-08-24 06:08:38 +00:00
obj1[0] = intl.string(getSystemLocale.t.nL2wKD);
2026-07-29 08:29:29 +00:00
obj1[1] = tmp4[1];
obj1[2] = function onClose() {
2026-07-20 16:05:17 +00:00
};
2026-09-02 09:53:35 +00:00
obj[1] = callback2(_modDef6229, obj1);
2026-08-24 06:08:38 +00:00
const items = [callback2(HeaderBackImage.FauxHeader, obj), ];
2026-07-20 16:05:17 +00:00
obj2 = {
keyboardShouldPersistTaps: "always",
data: found,
ListHeaderComponent() {
2026-07-29 08:29:29 +00:00
let tmp2 = null;
2026-07-20 16:05:17 +00:00
if (null != anyErrorMessage) {
2026-07-29 08:29:29 +00:00
tmp2 = null;
if ("" !== tmp) {
const obj = { style: null, children: null };
2026-08-24 06:08:38 +00:00
obj[0] = error.error;
2026-07-29 08:29:29 +00:00
obj[1] = tmp;
2026-08-24 06:08:38 +00:00
tmp2 = closure_1_10(closure_1_0(error[18]).LegacyText, obj);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
},
renderItem(item) {
item = item.item;
2026-07-29 08:29:29 +00:00
let id;
id = item.id;
2026-08-24 06:08:38 +00:00
return closure_1_10(closure_1_0(error[19]).HubEmailConnectionGuildSelectRow, {
signup: arr(function*() {
if (v0 === 2) {
v0 = 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-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-08-24 06:08:38 +00:00
}
2026-07-29 08:29:29 +00:00
} else {
2026-08-24 06:08:38 +00:00
try {
v0 = 2;
if (0 === c4) {
if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
closure_1 = tmp4;
closure_0 = tmp8;
v0(null);
closure_1_7(true);
let arr = 2;
let obj2 = closure_2_1(closure_2_2[14]);
c4 = 3;
v0 = 1;
obj1 = { value: null, done: false };
obj1[0] = obj2.sendVerificationEmail(closure_0, true, closure_0);
return obj1;
}
} else if (1 === tmp8) {
arr = 0;
closure_1_7(false);
throw closure_2;
2026-07-29 08:29:29 +00:00
} else {
2026-08-24 06:08:38 +00:00
if (2 === tmp8) {
arr = 1;
closure_0 = closure_2;
const aPIError = new id(closure_2_2[15]).APIError(closure_0);
v0(aPIError);
arr = 0;
closure_1_7(false);
v0 = 3;
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 !== 2) {
obj = { email: null, onClose: null, guildId: null };
obj[0] = closure_0;
obj[1] = closure_1_1;
obj[2] = closure_0;
arr = arr.push(closure_2_9.VERIFY_PIN, obj);
arr = 1;
}
2026-07-29 08:29:29 +00:00
arr = 0;
2026-08-24 06:08:38 +00:00
closure_1_7(false);
2026-07-29 08:29:29 +00:00
v0 = 3;
2026-08-24 06:08:38 +00:00
obj2 = { value: null, done: true };
obj2[0] = arg1;
return obj2;
}
} catch (tmp48) {
closure_2 = tmp48;
if (tmp5 === arr) {
v0 = tmp3;
throw tmp48;
} else if (tmp2 === tmp50) {
c4 = tmp2;
} else {
c4 = tmp;
2026-07-29 08:29:29 +00:00
}
}
}
2026-08-24 06:08:38 +00:00
}),
guildInfo: item,
loading: c6
2026-07-29 08:29:29 +00:00
});
2026-07-20 16:05:17 +00:00
},
keyExtractor(id) {
return id.id;
},
ListEmptyComponent() {
2026-07-29 08:29:29 +00:00
return callback(closure_14, {});
2026-07-20 16:05:17 +00:00
},
ItemSeparatorComponent() {
2026-07-29 08:29:29 +00:00
return callback(c6, { style: { height: 8 } });
2026-07-20 16:05:17 +00:00
},
style: tmp.scrollContainer,
contentContainerStyle: obj3
};
2026-09-02 09:53:35 +00:00
const tmp8Result = _modDef6229;
2026-07-20 16:05:17 +00:00
items[1] = callback2(anyErrorMessage, obj2);
2026-07-29 08:29:29 +00:00
obj[0] = items;
2026-07-20 16:05:17 +00:00
return callback3(closure_12, obj);
};