decord/source/modules/markup/native/MarkupReactGameMentionRule.tsx

106 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 13071
// Function ID: 13072
2026-07-20 16:05:17 +00:00
// Name: MarkupGameMention
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 21, 4661, 712, 6898, 1236, 4507, 4766, 6683, 5449, 9096, 9101, 4734, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 13071 (MarkupGameMention)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c3;
let c4;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsxs: c3, jsx: c4 } = jsxProd);
createCacheKey = { icon: null, chip: null, chipText: null };
createCacheKey = { width: 16, height: 16, borderRadius: require("Themes").radii.xs, marginRight: 2 };
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { backgroundColor: require("Themes").colors.BORDER_SUBTLE, borderRadius: require("Themes").radii.xs, paddingHorizontal: 2 };
let obj1 = { backgroundColor: require("Themes").colors.BORDER_SUBTLE, borderRadius: require("Themes").radii.xs, paddingHorizontal: 2 };
createCacheKey[2] = { color: require("Themes").unsafe_rawColors.BRAND_500 };
createCacheKey = createCacheKey.createStyles(createCacheKey);
let obj2 = { color: require("Themes").unsafe_rawColors.BRAND_500 };
const result = require("createCacheKey").fileFinishedImporting("modules/markup/native/MarkupReactGameMentionRule.tsx");
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
export default function MarkupGameMention(state) {
state = state.state;
let gameId;
2026-07-29 08:29:29 +00:00
const tmp = createCacheKey();
2026-08-05 07:35:12 +00:00
gameId = state.node.gameId;
2026-08-15 05:55:55 +00:00
let obj = state(6898);
2026-08-05 07:35:12 +00:00
const gameMentionData = obj.useGameMentionData(gameId);
2026-07-29 08:29:29 +00:00
const intl = state(1236).intl;
const stringResult = intl.string(state(1236).t["11pdXZ"]);
2026-08-05 07:35:12 +00:00
let gameName;
if (gameMentionData != null) {
gameName = gameMentionData.gameName;
}
if (gameName == null) {
gameName = stringResult;
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
let gameIcon;
if (gameMentionData != null) {
gameIcon = gameMentionData.gameIcon;
2026-07-20 16:05:17 +00:00
}
2026-08-15 05:55:55 +00:00
const tmp8Result = gameId(4507)(gameId, gameIcon, { size: 32 });
2026-08-05 07:35:12 +00:00
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;
2026-08-15 05:55:55 +00:00
return closure_3(tmp2(4766).MarkupText, obj, state.key);
2026-08-05 07:35:12 +00:00
} else {
obj = { size: "sm", style: null };
2026-07-29 08:29:29 +00:00
obj[1] = tmp.icon;
2026-08-05 07:35:12 +00:00
let tmp11 = null != tmp8Result;
2026-07-29 08:29:29 +00:00
if (tmp11) {
2026-08-05 07:35:12 +00:00
tmp11 = "" !== tmp8Result;
2026-07-20 16:05:17 +00:00
}
2026-08-15 05:55:55 +00:00
let tmp17Result = callback(tmp2(6683).UnknownGameIcon, obj);
2026-07-29 08:29:29 +00:00
if (tmp11) {
2026-08-05 07:35:12 +00:00
const obj1 = { style: null, source: null };
obj1[0] = tmp.icon;
const obj2 = { uri: null };
obj2[0] = tmp8Result;
obj1[1] = obj2;
2026-08-15 05:55:55 +00:00
tmp17Result = tmp17(tmp7(5449), obj1);
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
let str2 = "button";
2026-07-20 16:05:17 +00:00
if (state.noStyleAndInteraction) {
2026-08-05 07:35:12 +00:00
str2 = "text";
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
const obj3 = { accessibilityRole: null, style: null, color: null, onPress: null, children: null };
obj3[0] = str2;
obj3[1] = tmp.chip;
let textColor1;
2026-07-29 08:29:29 +00:00
if (state != null) {
2026-08-05 07:35:12 +00:00
textColor1 = state.textColor;
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
obj3[2] = textColor1;
2026-07-20 16:05:17 +00:00
let fn;
if (!state.noStyleAndInteraction) {
fn = () => {
2026-08-05 07:35:12 +00:00
let obj = gameId(outer1_2[10]);
obj = { gameId, gameProfileModalChecks: obj, source: state(outer1_2[11]).GameProfileSources.GameMention, sourceUserId: state.authorId };
obj = { shouldOpenGameProfile: true, gameId };
2026-07-20 16:05:17 +00:00
obj.openGameProfileModal(obj);
};
}
2026-08-05 07:35:12 +00:00
obj3[3] = fn;
const items1 = [tmp17Result, ];
const obj4 = { variant: "text-sm/medium", style: null, children: null };
obj4[1] = tmp.chipText;
obj4[2] = gameName;
2026-08-15 05:55:55 +00:00
items1[1] = callback(tmp2(4734).Text, obj4);
2026-08-05 07:35:12 +00:00
obj3[4] = items1;
2026-08-15 05:55:55 +00:00
return closure_3(tmp2(4766).MarkupText, obj3, state.key);
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
tmp7 = gameId;
2026-08-15 05:55:55 +00:00
const tmp8 = gameId(4507);
2026-07-20 16:05:17 +00:00
};