decord/source/modules/message_request/native/MessageRequestMutualServers.tsx

76 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16193
// Function ID: 16194
2026-07-20 16:05:17 +00:00
// Name: MessageRequestMutualServers
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 7226, 16194, 1236, 11836, 4739, 5438, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 16193 (MessageRequestMutualServers)
import noopAll from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c4, jsxs: c5 } = jsxProd);
let closure_6 = createCacheKey.createStyles({ container: { flexDirection: "row", alignItems: "center", gap: 4 }, label: { flexShrink: 1 } });
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/message_request/native/MessageRequestMutualServers.tsx");
2026-07-20 16:05:17 +00:00
export default function MessageRequestMutualServers(textVariant) {
({ onPress, iconSize } = textVariant);
({ userId, style } = textVariant);
if (iconSize === undefined) {
2026-08-24 06:08:38 +00:00
iconSize = iconSize(7226).GuildIconSizes.XXSMALL_12;
2026-07-20 16:05:17 +00:00
}
let str = textVariant.textVariant;
if (str === undefined) {
str = "text-xs/medium";
}
const suffix = textVariant.suffix;
const tmp3 = callback2();
2026-08-24 06:08:38 +00:00
let obj = iconSize(16194);
2026-07-20 16:05:17 +00:00
const mutualGuildsForMessageRequests = obj.useMutualGuildsForMessageRequests(userId);
const substr = mutualGuildsForMessageRequests.slice(0, 3);
if (mutualGuildsForMessageRequests.length > 0) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp4(1236).intl;
obj = { count: null };
obj[0] = length;
let formatResult = intl2.format(tmp4(1236).t.eE3oep, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp4(1236).intl;
formatResult = intl.string(tmp4(1236).t.jpY0X5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: items, children: null };
2026-07-23 10:11:24 +00:00
items = [tmp3.container, style];
2026-07-29 08:29:29 +00:00
let tmp9 = length > 0;
if (tmp9) {
2026-08-24 06:08:38 +00:00
obj1 = { size: null, names: null, children: null };
2026-07-29 08:29:29 +00:00
obj1[0] = iconSize;
obj1[1] = substr.map((name) => name.name);
2026-08-24 06:08:38 +00:00
obj1[2] = substr.map((guild) => closure_1_4(closure_1_1(closure_1_2[4]), { guild, size: iconSize }, guild.id));
tmp9 = callback(tmp4(11836).GuildIconPile, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items1 = [tmp9, ];
const obj2 = { variant: str, color: "text-muted", lineClamp: 1, style: tmp3.label, children: null };
2026-07-20 16:05:17 +00:00
let combined = formatResult;
if (null != suffix) {
const _HermesInternal = HermesInternal;
combined = "" + formatResult + " \u00B7 " + suffix;
}
2026-07-29 08:29:29 +00:00
obj2[4] = combined;
2026-08-24 06:08:38 +00:00
items1[1] = callback(iconSize(4739).Text, obj2);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
const tmp7Result = closure_5(View, obj);
let tmp11Result = tmp7Result;
2026-07-20 16:05:17 +00:00
if (null != onPress) {
2026-07-29 08:29:29 +00:00
tmp11Result = tmp7Result;
2026-07-20 16:05:17 +00:00
if (length > 0) {
2026-07-29 08:29:29 +00:00
const obj3 = { accessibilityRole: "button", onPress: null, children: null };
obj3[1] = onPress;
obj3[2] = tmp7Result;
2026-08-24 06:08:38 +00:00
tmp11Result = tmp11(tmp4(5438).PressableOpacity, obj3);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp11Result;
2026-07-20 16:05:17 +00:00
};