decord/source/modules/message_request/native/MessageRequestMutualServers.tsx
2026-09-02 09:53:35 +00:00

75 lines
2.7 KiB
TypeScript

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