decord/source/modules/guild/native/GuildInviteIcon.tsx

82 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12217
// Function ID: 12218
2026-07-29 08:29:29 +00:00
// Name: render
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 21, 4380, 712, 4108, 12218, 1236, 1435, 5374, 1903, 1297, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 12217 (render)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import getAvatarURLDefault from "getAvatarURL" /* 1435 */;
2026-08-25 06:04:03 +00:00
import preloadDefault from "preload" /* 5374 */;
import getClass from "getClass" /* 12218 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import { jsx } from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-08-24 06:08:38 +00:00
import importAllResult from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
let obj = { SMALL: "small", MEDIUM: "medium", LARGE: "large" };
2026-07-29 08:29:29 +00:00
let closure_5 = [16, 16, 14, 14, 12];
obj = { icon: { justifyContent: "center", alignItems: "center", overflow: "hidden" }, iconSmall: { width: 40, height: 40, borderRadius: 20 }, iconMedium: { width: 80, height: 80, borderRadius: 40 }, iconLarge: null, textContainer: null, acronym: null };
2026-08-24 06:08:38 +00:00
obj = { width: 128, height: 128, borderRadius: ThemesDefault.radii.round };
2026-07-29 08:29:29 +00:00
obj[3] = obj;
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_BRAND };
2026-07-29 08:29:29 +00:00
obj[4] = createCacheKey;
2026-08-24 06:08:38 +00:00
obj[5] = { color: ThemesDefault.unsafe_rawColors.WHITE };
2026-07-29 08:29:29 +00:00
let closure_6 = createCacheKey.createLegacyClassComponentStyles(obj);
const PureComponent = importAllResult.PureComponent;
class GuildInviteIcon extends PureComponent {
}
GuildInviteIcon.prototype["render"] = function render() {
const tmp = callback(this.context);
const props = this.props;
({ style, guild } = props);
({ size, textScale } = props);
2026-08-24 06:08:38 +00:00
let obj = getClass;
2026-07-29 08:29:29 +00:00
const getClassResult = obj.getClass(tmp, "icon", size);
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-29 08:29:29 +00:00
obj = { guildName: guild.name };
2026-08-24 06:08:38 +00:00
const formatToPlainStringResult = intl.formatToPlainString(getSystemLocale.t.xm6W9D, obj);
2026-07-29 08:29:29 +00:00
if (null != guild.icon) {
obj = { id: null, icon: null, canAnimate: true, size: 128 };
({ id: obj7[0], icon: obj7[1] } = guild);
2026-08-24 06:08:38 +00:00
const guildIconSource = getAvatarURLDefault.getGuildIconSource(obj);
obj1 = { accessibilityRole: "image", accessibilityLabel: null, style: null, source: null };
2026-07-29 08:29:29 +00:00
obj1[1] = formatToPlainStringResult;
const items = [tmp.icon, getClassResult, style];
obj1[2] = items;
obj1[3] = guildIconSource;
2026-08-24 06:08:38 +00:00
return jsx(preloadDefault, { accessibilityRole: "image", accessibilityLabel: null, style: null, source: null });
2026-07-29 08:29:29 +00:00
} else {
2026-08-11 06:20:06 +00:00
const acronym = tmp2(1903).getAcronym(guild.name);
2026-07-29 08:29:29 +00:00
let num = table[acronym.length - 1];
if (num == null) {
num = 10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj2 = { accessible: true, accessibilityRole: "image", accessibilityLabel: null, style: null, children: null };
obj2[2] = formatToPlainStringResult;
const items1 = [, , , ];
({ textContainer: arr[0], icon: arr[1] } = tmp);
items1[2] = getClassResult;
items1[3] = style;
obj2[3] = items1;
const result = num * textScale;
const obj3 = { numberOfLines: 1, style: null, children: null };
const items2 = [tmp.acronym, ];
const obj4 = { fontSize: null };
obj4[0] = result;
items2[1] = obj4;
obj3[1] = items2;
obj3[2] = acronym;
obj2[4] = jsx(tmp2(1297).LegacyText, { numberOfLines: 1, style: null, children: null });
return <View accessible accessibilityRole="image" accessibilityLabel={null} style={null}>{null}</View>;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
GuildInviteIcon.defaultProps = { size: obj.SMALL, textScale: 1 };
GuildInviteIcon.Sizes = obj;
GuildInviteIcon.contextType = require("ManaContext").ThemeContext;
2026-08-24 06:08:38 +00:00
let obj2 = { color: ThemesDefault.unsafe_rawColors.WHITE };
let result = require("set").fileFinishedImporting("modules/guild/native/GuildInviteIcon.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default GuildInviteIcon;