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

75 lines
2.6 KiB
TypeScript
Raw Normal View History

// Module ID: 7313
// Function ID: 7314
2026-07-20 16:05:17 +00:00
// Name: VerifiedRoleIcon
// Dependencies: [19, 17, 1074, 21, 576, 4638, 7314, 7296, 7315, 4580, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 7313 (VerifiedRoleIcon)
import nativeDefault from "native" /* 576 */;
import useRoleIconProps from "useRoleIconProps" /* 7296 */;
import getHigherContrastColor from "getHigherContrastColor" /* 7314 */;
import RoleIconDefault from "RoleIcon" /* 7315 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const LinkIcon = tmp3(4580);
require = fn;
const View = fn(17).View;
const Constants = fn(1074);
({ DEFAULT_ROLE_COLOR_HEX: closure_4, EMPTY_STRING_SNOWFLAKE_ID: hasOwnProperty } = Constants);
const jsx = fn(21).jsx;
const WHITE = nativeDefault.unsafe_rawColors.WHITE;
const PRIMARY_630 = nativeDefault.unsafe_rawColors.PRIMARY_630;
const createStyles = fn(4638);
let obj2 = { iconContainer: { alignItems: "center", justifyContent: "center", borderRadius: nativeDefault.radii.round } };
let closure_9 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/connections/native/VerifiedRoleIcon.tsx");
2026-07-20 16:05:17 +00:00
export default function VerifiedRoleIcon(arg0) {
({ 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) {
roleColor = React4;
2026-07-20 16:05:17 +00:00
}
const tmp = closure_9();
const obj2 = { backgroundColor: roleColor, colors: null };
2026-07-20 16:05:17 +00:00
const items = [WHITE, PRIMARY_630];
obj2.colors = items;
2026-07-20 16:05:17 +00:00
const diff = size - size / 8 * 2;
const higherContrastColor = getHigherContrastColor.getHigherContrastColor(obj2);
const obj4 = { guildId, roleId: null, size: null };
2026-07-29 08:29:29 +00:00
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) {
roleId = hasOwnProperty;
2026-07-20 16:05:17 +00:00
}
obj4.roleId = roleId;
obj4.size = diff;
const roleIconProps = useRoleIconProps.useRoleIconProps(obj4);
const obj5 = { style: null, children: null };
const items1 = [style, tmp.iconContainer, { width: size, height: size, backgroundColor: roleColor }];
obj5.style = items1;
if (false !== displayRoleIcon) {
if (null != roleIconProps) {
const obj6 = {};
const merged = Object.assign(roleIconProps);
let tmp9Result = tmp9(RoleIconDefault, obj6);
}
obj5.children = tmp9Result;
return tmp9(tmp10, obj5);
2026-07-20 16:05:17 +00:00
}
tmp9Result = tmp9(LinkIcon.LinkIcon, { style: { width: diff, height: diff }, size: "custom", color: higherContrastColor });
2026-07-20 16:05:17 +00:00
};