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

106 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13127
// Function ID: 13128
2026-07-20 16:05:17 +00:00
// Name: MarkupGameMention
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 21, 4668, 712, 6936, 1236, 4511, 4771, 6719, 5454, 9133, 9138, 4739, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 13127 (MarkupGameMention)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsxs: c3, jsx: c4 } = jsxProd);
createCacheKey = { icon: null, chip: null, chipText: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { width: 16, height: 16, borderRadius: ThemesDefault.radii.xs, marginRight: 2 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
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");
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-08-24 06:08:38 +00:00
const tmp = callback2();
2026-08-05 07:35:12 +00:00
gameId = state.node.gameId;
2026-08-24 06:08:38 +00:00
let obj = state(6936);
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-24 06:08:38 +00:00
const tmp8Result = gameId(4511)(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-24 06:08:38 +00:00
return closure_3(tmp2(4771).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-24 06:08:38 +00:00
let tmp17Result = callback(tmp2(6719).UnknownGameIcon, obj);
2026-07-29 08:29:29 +00:00
if (tmp11) {
2026-08-24 06:08:38 +00:00
obj1 = { style: null, source: null };
2026-08-05 07:35:12 +00:00
obj1[0] = tmp.icon;
const obj2 = { uri: null };
obj2[0] = tmp8Result;
obj1[1] = obj2;
2026-08-24 06:08:38 +00:00
tmp17Result = tmp17(tmp7(5454), 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-24 06:08:38 +00:00
let obj = gameId(closure_1_2[10]);
obj = { gameId, gameProfileModalChecks: obj, source: state(closure_1_2[11]).GameProfileSources.GameMention, sourceUserId: state.authorId };
2026-08-05 07:35:12 +00:00
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-24 06:08:38 +00:00
items1[1] = callback(tmp2(4739).Text, obj4);
2026-08-05 07:35:12 +00:00
obj3[4] = items1;
2026-08-24 06:08:38 +00:00
return closure_3(tmp2(4771).MarkupText, obj3, state.key);
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
tmp7 = gameId;
2026-08-24 06:08:38 +00:00
const tmp8 = gameId(4511);
2026-07-20 16:05:17 +00:00
};