decord/source/modules/guild_onboarding/native/ConnectionCardView.tsx

79 lines
3.8 KiB
TypeScript
Raw Normal View History

// Module ID: 7117
// Function ID: 7118
2026-07-20 16:05:17 +00:00
// Name: ConnectionCardView
// Dependencies: [19, 17, 21, 4481, 709, 4477, 1233, 4441, 4936, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 7117 (ConnectionCardView)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
import Text from "Text" /* 4477 */;
2026-08-24 06:08:38 +00:00
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4481 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ View: obj1, ActivityIndicator: c3 } = get_ActivityIndicator);
({ jsx: c4, jsxs: c5 } = jsxProd);
createCacheKey = { card: null, leftContent: null, icon: null, textContent: null, connectedStatus: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH, borderRadius: ThemesDefault.radii.md, borderWidth: 1, borderColor: ThemesDefault.colors.BORDER_SUBTLE, padding: ThemesDefault.space.PX_16, marginBottom: ThemesDefault.space.PX_12, flexDirection: "row", alignItems: "center", justifyContent: "space-between" };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { flexDirection: "row", alignItems: "center", flex: 1, marginRight: ThemesDefault.space.PX_12 };
obj1 = { flexDirection: "row", alignItems: "center", flex: 1, marginRight: ThemesDefault.space.PX_12 };
createCacheKey[2] = { width: 32, height: 32, marginRight: ThemesDefault.space.PX_12, justifyContent: "center", alignItems: "center" };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = { flex: 1 };
2026-08-24 06:08:38 +00:00
let obj2 = { width: 32, height: 32, marginRight: ThemesDefault.space.PX_12, justifyContent: "center", alignItems: "center" };
createCacheKey[4] = { flexDirection: "row", alignItems: "center", gap: ThemesDefault.space.PX_8 };
let closure_6 = createCacheKey.createStyles(createCacheKey);
let obj3 = { flexDirection: "row", alignItems: "center", gap: ThemesDefault.space.PX_8 };
const result = require("set").fileFinishedImporting("modules/guild_onboarding/native/ConnectionCardView.tsx");
2026-07-20 16:05:17 +00:00
export default function ConnectionCardView(description) {
description = description.description;
({ displayName, icon, isLoading, isConnected, canConnect, onConnect } = description);
2026-08-24 06:08:38 +00:00
const tmp = callback2();
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.card, children: null };
obj = { style: tmp.leftContent, children: null };
2026-07-20 16:05:17 +00:00
obj = { style: tmp.icon, children: icon };
const items = [callback(closure_2, obj), ];
2026-08-24 06:08:38 +00:00
obj1 = { style: tmp.textContent, children: null };
const items1 = [callback(Text.Text, { variant: "text-md/medium", color: "text-strong", children: displayName }), ];
2026-07-29 08:29:29 +00:00
let tmp4Result = null != description;
if (tmp4Result) {
tmp4Result = description.length > 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp4Result) {
const obj2 = { variant: "text-sm/normal", color: "text-subtle", children: null };
obj2[2] = description;
tmp4Result = tmp4(tmp5(4477).Text, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items1[1] = tmp4Result;
obj1[1] = items1;
items[1] = closure_5(closure_2, obj1);
obj[1] = items;
const items2 = [closure_5(closure_2, obj), ];
2026-07-20 16:05:17 +00:00
if (isLoading) {
2026-07-29 08:29:29 +00:00
tmp4Result = tmp4(closure_3, { size: "small" });
2026-07-20 16:05:17 +00:00
} else if (isConnected) {
2026-07-29 08:29:29 +00:00
const obj3 = { style: null, children: null };
obj3[0] = tmp.connectedStatus;
const obj4 = { variant: "text-sm/medium", color: "text-feedback-positive", children: null };
2026-09-02 09:53:35 +00:00
const intl2 = tmp5(1233).intl;
obj4[2] = intl2.string(tmp5(1233).t["LV+CXH"]);
const items3 = [tmp4(tmp5(4477).Text, obj4), tmp4(tmp5(4441).CircleCheckIcon, { size: "sm", color: "status-positive" })];
2026-07-29 08:29:29 +00:00
obj3[1] = items3;
tmp4Result = tmp2(tmp3, obj3);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj5 = { variant: "primary", size: "sm", onPress: null, text: null, disabled: null };
obj5[2] = onConnect;
2026-09-02 09:53:35 +00:00
const intl = tmp5(1233).intl;
obj5[3] = intl.string(tmp5(1233).t.S0W8Z5);
2026-07-29 08:29:29 +00:00
obj5[4] = !canConnect;
tmp4Result = tmp4(tmp5(4936).Button, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items2[1] = tmp4Result;
obj[1] = items2;
return closure_5(closure_2, obj);
2026-07-20 16:05:17 +00:00
};