decord/alpha/source/modules/connections/native/VerifiedRoleIcon.tsx
github-actions 72019a2d0c chore: update source for alpha 348.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-25 08:38:05 +00:00

74 lines
2.6 KiB
TypeScript

// Module ID: 6619
// Function ID: 6620
// Name: VerifiedRoleIcon
// Dependencies: [19, 17, 1074, 21, 576, 4829, 6620, 6602, 6621, 4771, 2]
// Exports: default
// Module 6619 (VerifiedRoleIcon)
import nativeDefault from "native" /* 576 */;
import useRoleIconProps from "useRoleIconProps" /* 6602 */;
import getHigherContrastColor from "getHigherContrastColor" /* 6620 */;
import RoleIconDefault from "RoleIcon" /* 6621 */;
import noop from "module_19" /* 19 */;
const LinkIcon = tmp3(4771);
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(4829);
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");
export default function VerifiedRoleIcon(arg0) {
({ role, roleId, roleColor, size } = arg0);
({ guildId, style, displayRoleIcon } = arg0);
if (roleColor == null) {
let colorString;
if (role != null) {
colorString = role.colorString;
}
roleColor = colorString;
}
if (roleColor == null) {
roleColor = React4;
}
const tmp = closure_9();
const obj2 = { backgroundColor: roleColor, colors: null };
const items = [WHITE, PRIMARY_630];
obj2.colors = items;
const diff = size - size / 8 * 2;
const higherContrastColor = getHigherContrastColor.getHigherContrastColor(obj2);
const obj4 = { guildId, roleId: null, size: null };
if (roleId == null) {
let id;
if (role != null) {
id = role.id;
}
roleId = id;
}
if (roleId == null) {
roleId = hasOwnProperty;
}
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);
}
tmp9Result = tmp9(LinkIcon.LinkIcon, { style: { width: diff, height: diff }, size: "custom", color: higherContrastColor });
};