// Module ID: 13398 // Function ID: 13399 // Name: MarkupGameMention // Dependencies: [19, 21, 4380, 712, 4934, 6033, 1236, 4413, 4371, 8097, 5374, 9425, 9431, 4376, 2] // Exports: default // Module 13398 (MarkupGameMention) import noopAll from "noop" /* 19 */; import ThemesDefault from "Themes" /* 712 */; import jsxProd from "jsxProd" /* 21 */; import createCacheKey from "createCacheKey" /* 4380 */; const require = arg1; noopAll; ({ jsxs: c3, jsx: c4 } = jsxProd); createCacheKey = { icon: null, chip: null, chipText: null }; createCacheKey = { width: 16, height: 16, borderRadius: ThemesDefault.radii.xs, marginRight: 2 }; createCacheKey[0] = createCacheKey; createCacheKey[1] = { backgroundColor: ThemesDefault.colors.BORDER_SUBTLE, borderRadius: ThemesDefault.radii.xs, paddingHorizontal: 2 }; let obj1 = { backgroundColor: ThemesDefault.colors.BORDER_SUBTLE, borderRadius: ThemesDefault.radii.xs, paddingHorizontal: 2 }; createCacheKey[2] = { color: ThemesDefault.unsafe_rawColors.BRAND_500 }; let closure_5 = createCacheKey.createStyles(createCacheKey); let obj2 = { color: ThemesDefault.unsafe_rawColors.BRAND_500 }; const result = require("set").fileFinishedImporting("modules/markup/native/MarkupReactGameMentionRule.tsx"); export default function MarkupGameMention(state) { state = state.state; let gameId; const tmp = callback2(); gameId = state.node.gameId; let obj = state(4934); const gameMentionData = obj.useGameMentionData(gameId); obj1 = state(6033); let tmp5; if (true === state.shouldFetchGameMentionData) { tmp5 = gameId; } const game = obj1.useGame(tmp5); const intl = tmp2(1236).intl; const stringResult = intl.string(state(1236).t["11pdXZ"]); let gameName; if (gameMentionData != null) { gameName = gameMentionData.gameName; } if (gameName == null) { gameName = stringResult; } let gameIcon; if (gameMentionData != null) { gameIcon = gameMentionData.gameIcon; } const tmp10Result = gameId(4413)(gameId, gameIcon, { size: 32 }); if (null == gameMentionData) { let textColor; if (state != null) { textColor = state.textColor; } obj = { color: null, children: null }; obj[0] = textColor; const items = ["@", stringResult]; obj[1] = items; return closure_3(tmp2(4371).MarkupText, obj, state.key); } else { obj = { size: "sm", style: null }; obj[1] = tmp.icon; let tmp13 = null != tmp10Result; if (tmp13) { tmp13 = "" !== tmp10Result; } let tmp19Result = callback(tmp2(8097).UnknownGameIcon, obj); if (tmp13) { obj1 = { style: null, source: null }; obj1[0] = tmp.icon; const obj2 = { uri: null }; obj2[0] = tmp10Result; obj1[1] = obj2; tmp19Result = tmp19(tmp9(5374), obj1); } let str2 = "button"; if (state.noStyleAndInteraction) { str2 = "text"; } const obj3 = { accessibilityRole: null, style: null, color: null, onPress: null, children: null }; obj3[0] = str2; obj3[1] = tmp.chip; let textColor1; if (state != null) { textColor1 = state.textColor; } obj3[2] = textColor1; let fn; if (!state.noStyleAndInteraction) { fn = () => { let obj = gameId(closure_1_2[11]); obj = { gameId, gameProfileModalChecks: obj, source: state(closure_1_2[12]).GameProfileSources.GameMention, sourceUserId: state.authorId }; obj = { shouldOpenGameProfile: true, gameId }; obj.openGameProfileModal(obj); }; } obj3[3] = fn; const items1 = [tmp19Result, ]; const obj4 = { variant: "text-sm/medium", style: null, children: null }; obj4[1] = tmp.chipText; obj4[2] = gameName; items1[1] = callback(tmp2(4376).Text, obj4); obj3[4] = items1; return closure_3(tmp2(4371).MarkupText, obj3, state.key); } const tmp10 = gameId(4413); tmp9 = gameId; };