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

88 lines
3.1 KiB
TypeScript
Raw Normal View History

// Module ID: 11708
// Function ID: 11709
2026-07-20 16:05:17 +00:00
// Name: OfficialConnectionIcon
// Dependencies: [19, 17, 1074, 21, 4638, 7296, 7315, 576, 1092, 1177, 11709, 11710, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 11708 (OfficialConnectionIcon)
import nativeDefault from "native" /* 576 */;
import utils_ColorUtils from "utils/ColorUtils" /* 1092 */;
import native from "native" /* 1177 */;
import useRoleIconProps from "useRoleIconProps" /* 7296 */;
import RoleIconDefault from "RoleIcon" /* 7315 */;
import _modDef11709 from "module_11709" /* 11709 */;
import _modDef11710 from "module_11710" /* 11710 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const View = fn(17).View;
const Constants = fn(1074);
({ DEFAULT_ROLE_COLOR_HEX: closure_4, EMPTY_STRING_SNOWFLAKE_ID: hasOwnProperty } = Constants);
const jsxProd = fn(21);
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
const createStyles = fn(4638);
let closure_8 = createStyles.createStyles({ verifiedCheck: { position: "absolute", left: 0, top: 0 } });
const size = fn(2);
const result = size.fileFinishedImporting("modules/connections/native/OfficialConnectionIcon.tsx");
2026-07-20 16:05:17 +00:00
export default function OfficialConnectionIcon(arg0) {
({ role, roleId, roleColor, size, style } = arg0);
({ guildId, displayRoleIcon } = arg0);
const tmp = closure_8();
const size1 = { width: size, height: size };
const obj = { 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
}
obj.roleId = roleId;
obj.size = size;
const roleIconProps = useRoleIconProps.useRoleIconProps(obj);
2026-07-20 16:05:17 +00:00
if (false !== displayRoleIcon) {
if (null != roleIconProps) {
const obj3 = { style: null, children: null };
const items = [style, size1];
obj3.style = items;
const obj4 = {};
const merged = Object.assign(roleIconProps);
obj3.children = timestampProducer(RoleIconDefault, obj4);
return timestampProducer(View, obj3);
2026-07-20 16:05:17 +00:00
}
}
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
}
let PRIMARY_630 = nativeDefault.unsafe_rawColors.WHITE;
const tmp2Result = utils_ColorUtils;
const hex2intResult = utils_ColorUtils.hex2int(roleColor);
if (tmp2Result2.getDarkness(hex2intResult) < 0.3) {
PRIMARY_630 = tmp7(576).unsafe_rawColors.PRIMARY_630;
2026-07-20 16:05:17 +00:00
}
const obj5 = { style: null, children: null };
const items1 = [style, size1];
obj5.style = items1;
const obj6 = { style: null, size: native.Icon.Sizes.CUSTOM, source: _modDef11709, color: roleColor };
const items2 = [tmp.verifiedCheck, size1];
obj6.style = items2;
const items3 = [timestampProducer(native.Icon, obj6), ];
const obj7 = { style: null, size: native.Icon.Sizes.CUSTOM, source: _modDef11710, color: PRIMARY_630 };
const items4 = [tmp.verifiedCheck, size1];
obj7.style = items4;
items3[1] = timestampProducer(native.Icon, obj7);
obj5.children = items3;
return React5(View, obj5);
2026-07-20 16:05:17 +00:00
};