decord/source/modules/connections/native/VerifiedRoleIcon.tsx

79 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 5811
// Function ID: 5812
2026-07-20 16:05:17 +00:00
// Name: VerifiedRoleIcon
2026-08-12 06:57:52 +00:00
// Dependencies: [19, 17, 676, 21, 712, 4344, 5812, 5791, 4288, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-12 06:57:52 +00:00
// Module 5811 (VerifiedRoleIcon)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import ME from "ME";
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c3;
let c4;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ DEFAULT_ROLE_COLOR_HEX: c3, EMPTY_STRING_SNOWFLAKE_ID: c4 } = ME);
const WHITE = require("Themes").unsafe_rawColors.WHITE;
const PRIMARY_630 = require("Themes").unsafe_rawColors.PRIMARY_630;
createCacheKey = { iconContainer: null };
createCacheKey = { alignItems: "center", justifyContent: "center", borderRadius: require("Themes").radii.round };
createCacheKey[0] = createCacheKey;
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
const result = require("ME").fileFinishedImporting("modules/connections/native/VerifiedRoleIcon.tsx");
2026-07-20 16:05:17 +00:00
export default function VerifiedRoleIcon(arg0) {
let displayRoleIcon;
let guildId;
let role;
let roleColor;
let roleId;
let size;
let style;
({ role, roleId, roleColor, size } = arg0);
({ guildId, style, displayRoleIcon } = arg0);
2026-07-29 08:29:29 +00:00
if (roleColor == null) {
2026-07-20 16:05:17 +00:00
let colorString;
2026-07-29 08:29:29 +00:00
if (role != null) {
2026-07-20 16:05:17 +00:00
colorString = role.colorString;
}
roleColor = colorString;
}
2026-07-29 08:29:29 +00:00
if (roleColor == null) {
2026-07-20 16:05:17 +00:00
roleColor = closure_3;
}
2026-08-12 06:57:52 +00:00
let obj = require(5812) /* getHigherContrastColor */;
2026-07-20 16:05:17 +00:00
const items = [WHITE, PRIMARY_630];
const diff = size - size / 8 * 2;
2026-07-29 08:29:29 +00:00
const higherContrastColor = obj.getHigherContrastColor({ backgroundColor: roleColor, colors: items });
2026-08-12 06:57:52 +00:00
let obj1 = require(5791) /* useRoleIcon */;
2026-07-29 08:29:29 +00:00
obj = { guildId, roleId: null, size: null };
if (roleId == null) {
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (role != null) {
2026-07-20 16:05:17 +00:00
id = role.id;
}
roleId = id;
}
2026-07-29 08:29:29 +00:00
if (roleId == null) {
2026-07-20 16:05:17 +00:00
roleId = closure_4;
}
2026-07-29 08:29:29 +00:00
obj[1] = roleId;
obj[2] = diff;
let roleIcon = obj1.useRoleIcon(obj);
obj = { style: items1, children: null };
items1 = [style, createCacheKey().iconContainer, { width: size, height: size, backgroundColor: roleColor }];
2026-07-20 16:05:17 +00:00
if (false === displayRoleIcon) {
2026-07-29 08:29:29 +00:00
obj1 = { style: null, size: "custom", color: null };
const obj2 = { width: null, height: null };
obj2[0] = diff;
obj2[1] = diff;
obj1[0] = obj2;
obj1[2] = higherContrastColor;
2026-08-12 06:57:52 +00:00
roleIcon = tmp9(require(4288) /* LinkIcon */.LinkIcon, obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = roleIcon;
return <View style={items1}>{null}</View>;
2026-07-20 16:05:17 +00:00
};