55 lines
3.8 KiB
TypeScript
55 lines
3.8 KiB
TypeScript
/* Metro module 6812; source: modules/connections/native/VerifiedRoleIcon.tsx; dependencies: [31, 27, 661, 33, 697, 4501, 6813, 6793, 4056, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as RoleIconUtilsModule from '../../guild_boosting/native/RoleIconUtils.tsx'; /* Metro dependency 6793 */
|
|
import * as GetHigherContrastColorModule from '../../user_profile/utils/getHigherContrastColor.tsx'; /* Metro dependency 6813 */
|
|
|
|
function _fun53578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6990:6, offset: 0x0134fe29, size: 302 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ConstantsModule;
|
|
const env0_3 = value.DEFAULT_ROLE_COLOR_HEX;
|
|
const env0_4 = value.EMPTY_STRING_SNOWFLAKE_ID;
|
|
const env0_6 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
const env0_7 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_630;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object2 = {'alignItems': 'center', 'justifyContent': 'center'};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const env0_8 = Reflect.apply(createStyles, value, [{iconContainer: object2}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/VerifiedRoleIcon.tsx');
|
|
exports.default = VerifiedRoleIcon;
|
|
function VerifiedRoleIcon({guildId, role, roleId, roleColor, size, style, displayRoleIcon}) { // fn#53579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6990:482, offset: 0x0134ff57, size: 366 bytes, params: 2, frame: 27
|
|
const styles = useStyles();
|
|
let r13 = roleColor ?? role?.colorString;
|
|
r13 = r13 ?? DEFAULT_ROLE_COLOR_HEX;
|
|
const higherContrastColor = (GetHigherContrastColorModule).getHigherContrastColor({backgroundColor: r13,
|
|
colors: [WHITE, PRIMARY_630]});
|
|
const value4 = size - size / 8 * 2;
|
|
const useRoleIcon = RoleIconUtilsModule.useRoleIcon;
|
|
let r4 = roleId ?? role?.id;
|
|
r4 = r4 ?? EMPTY_STRING_SNOWFLAKE_ID;
|
|
return (
|
|
<View style={[style, styles.iconContainer, {width: size, height: size, backgroundColor: r13}]}>
|
|
{
|
|
displayRoleIcon === false
|
|
? ((LinkIcon) => <LinkIcon style={{width: value4,
|
|
height: value4}} size="custom" color={higherContrastColor} />)((require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon)
|
|
: Reflect.apply(useRoleIcon, RoleIconUtilsModule, [{guildId: guildId, roleId: r4,
|
|
size: value4}]) ?? ((LinkIcon) => <LinkIcon style={{width: value4,
|
|
height: value4}} size="custom" color={higherContrastColor} />)((require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon)
|
|
}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun53578, 6812, [31, 27, 661, 33, 697, 4501, 6813, 6793, 4056,
|
|
2]) /* metro module 6812, dependencies: [31, 27, 661, 33, 697, 4501, 6813, 6793, 4056, 2] */;
|