Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
87 lines
3.1 KiB
TypeScript
87 lines
3.1 KiB
TypeScript
// Module ID: 11846
|
|
// Function ID: 11847
|
|
// Name: OfficialConnectionIcon
|
|
// Dependencies: [19, 17, 1074, 21, 4788, 7463, 7482, 576, 1092, 1177, 11847, 11848, 2]
|
|
// Exports: default
|
|
|
|
// Module 11846 (OfficialConnectionIcon)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import utils_ColorUtils from "utils/ColorUtils" /* 1092 */;
|
|
import native from "native" /* 1177 */;
|
|
import useRoleIconProps from "useRoleIconProps" /* 7463 */;
|
|
import RoleIconDefault from "RoleIcon" /* 7482 */;
|
|
import _modDef11847 from "module_11847" /* 11847 */;
|
|
import _modDef11848 from "module_11848" /* 11848 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
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(4788);
|
|
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");
|
|
|
|
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 };
|
|
if (roleId == null) {
|
|
let id;
|
|
if (role != null) {
|
|
id = role.id;
|
|
}
|
|
roleId = id;
|
|
}
|
|
if (roleId == null) {
|
|
roleId = hasOwnProperty;
|
|
}
|
|
obj.roleId = roleId;
|
|
obj.size = size;
|
|
const roleIconProps = useRoleIconProps.useRoleIconProps(obj);
|
|
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);
|
|
}
|
|
}
|
|
if (roleColor == null) {
|
|
let colorString;
|
|
if (role != null) {
|
|
colorString = role.colorString;
|
|
}
|
|
roleColor = colorString;
|
|
}
|
|
if (roleColor == null) {
|
|
roleColor = React4;
|
|
}
|
|
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;
|
|
}
|
|
const obj5 = { style: null, children: null };
|
|
const items1 = [style, size1];
|
|
obj5.style = items1;
|
|
const obj6 = { style: null, size: native.Icon.Sizes.CUSTOM, source: _modDef11847, 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: _modDef11848, color: PRIMARY_630 };
|
|
const items4 = [tmp.verifiedCheck, size1];
|
|
obj7.style = items4;
|
|
items3[1] = timestampProducer(native.Icon, obj7);
|
|
obj5.children = items3;
|
|
return React5(View, obj5);
|
|
};
|