/* Metro module 12723; source: design/void/HelpMessage/native/HelpMessage.tsx; dependencies: [31, 27, 33, 4501, 697, 673, 7684, 4068, 6988, 4073, 6766, 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 ColorUtilsModule from '../../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */ import * as TextWithIOSLinkWorkaroundModule from '../../../../modules/a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */ function _fun97412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12913:6, offset: 0x0217f835, size: 809 bytes, params: 8, frame: 32 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); ReactModule; let value = JsxRuntimeModule; const env0_4 = value.jsx; const env0_5 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const object2 = {'padding': null, 'borderWidth': 1, 'borderStyle': 'solid'}; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object2.padding = PX_8; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object2.gap = PX_8; object.container = object2; object.row = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'}; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object.content = {flex: 1, marginLeft: PX_8}; const object4 = {}; let int2rgba = ColorUtilsModule.int2rgba; let hex2int = ColorUtilsModule.hex2int; let YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300; object4.backgroundColor = Reflect.apply(int2rgba, ColorUtilsModule, [Reflect.apply(hex2int, ColorUtilsModule, [YELLOW_300]), 0.1]); YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300; object4.borderColor = YELLOW_300; object.warningContainer = object4; const object5 = {}; int2rgba = ColorUtilsModule.int2rgba; hex2int = ColorUtilsModule.hex2int; let BLUE_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLUE_345; object5.backgroundColor = Reflect.apply(int2rgba, ColorUtilsModule, [Reflect.apply(hex2int, ColorUtilsModule, [BLUE_345]), 0.1]); BLUE_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLUE_345; object5.borderColor = BLUE_345; object.infoContainer = object5; const object6 = {}; int2rgba = ColorUtilsModule.int2rgba; hex2int = ColorUtilsModule.hex2int; let RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400; object6.backgroundColor = Reflect.apply(int2rgba, ColorUtilsModule, [Reflect.apply(hex2int, ColorUtilsModule, [RED_400]), 0.1]); RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400; object6.borderColor = RED_400; object.errorContainer = object6; const object7 = {}; int2rgba = ColorUtilsModule.int2rgba; hex2int = ColorUtilsModule.hex2int; let GREEN_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_400; object7.backgroundColor = Reflect.apply(int2rgba, ColorUtilsModule, [Reflect.apply(hex2int, ColorUtilsModule, [GREEN_400]), 0.1]); GREEN_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_400; object7.borderColor = GREEN_400; object.successContainer = object7; const env0_6 = Reflect.apply(createStyles, value, [object]); object = {WARNING: 0}; object[0] = 'WARNING'; object.INFO = 1; object[1] = 'INFO'; object.ERROR = 2; object[2] = 'ERROR'; object.SUCCESS = 3; object[3] = 'SUCCESS'; (FileImportTrackerModule).fileFinishedImporting('design/void/HelpMessage/native/HelpMessage.tsx'); exports.default = HelpMessage; exports.HelpMessageTypes = object; function getIcon(a0) { // fn#97413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12913:1105, offset: 0x0217fb5e, size: 364 bytes, params: 2, frame: 17 const WARNING = env0_7.WARNING; if (WARNING === a0) { const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon; return ; } const INFO = env0_7.INFO; if (INFO === a0) { const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon; return ( ); } const ERROR = env0_7.ERROR; if (ERROR === a0) { const CircleXIcon = (require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon; return ; } const SUCCESS = env0_7.SUCCESS; if (SUCCESS === a0) { const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon; return ; } } function useContainerStyle(a0, a1) { // fn#97414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12913:1499, offset: 0x0217fcca, size: 101 bytes, params: 3, frame: 4 const WARNING = env0_7.WARNING; if (WARNING === a0) { return a1.warningContainer; } const INFO = env0_7.INFO; if (INFO === a0) { return a1.infoContainer; } const ERROR = env0_7.ERROR; if (ERROR === a0) { return a1.errorContainer; } const SUCCESS = env0_7.SUCCESS; if (SUCCESS === a0) { return a1.successContainer; } } function HelpMessage({children, messageType, textVariant, textColor, borderRadius = importDefault(dependencyMap[4]).radii.xs, button}) { // fn#97415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12913:1787, offset: 0x0217fd2f, size: 285 bytes, params: 2, frame: 24 textVariant = textVariant === undefined ? 'text-sm/medium' : textVariant; textColor = textColor === undefined ? 'text-default' : textColor; const styles = useStyles(); const items2 = [styles.container]; items2[1] = useContainerStyle(messageType, styles); items2[2] = {borderRadius: borderRadius}; const icon = getIcon(messageType); const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround; return ( {icon} {children} {button} ); } } global.__d(_fun97412, 12723, [31, 27, 33, 4501, 697, 673, 7684, 4068, 6988, 4073, 6766, 2]) /* metro module 12723, dependencies: [31, 27, 33, 4501, 697, 673, 7684, 4068, 6988, 4073, 6766, 2] */;