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

112 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 13398
// Function ID: 13399
2026-07-20 16:05:17 +00:00
// Name: MarkupGameMention
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 21, 4380, 712, 4934, 6033, 1236, 4413, 4371, 8097, 5374, 9425, 9431, 4376, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 13398 (MarkupGameMention)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
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-25 06:04:03 +00:00
let obj = state(4934);
2026-08-05 07:35:12 +00:00
const gameMentionData = obj.useGameMentionData(gameId);
2026-08-25 06:04:03 +00:00
obj1 = state(6033);
let tmp5;
if (true === state.shouldFetchGameMentionData) {
tmp5 = gameId;
}
const game = obj1.useGame(tmp5);
const intl = tmp2(1236).intl;
2026-07-29 08:29:29 +00:00
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-25 06:04:03 +00:00
const tmp10Result = gameId(4413)(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-25 06:04:03 +00:00
return closure_3(tmp2(4371).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-25 06:04:03 +00:00
let tmp13 = null != tmp10Result;
if (tmp13) {
tmp13 = "" !== tmp10Result;
2026-07-20 16:05:17 +00:00
}
2026-08-25 06:04:03 +00:00
let tmp19Result = callback(tmp2(8097).UnknownGameIcon, obj);
if (tmp13) {
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 };
2026-08-25 06:04:03 +00:00
obj2[0] = tmp10Result;
2026-08-05 07:35:12 +00:00
obj1[1] = obj2;
2026-08-25 06:04:03 +00:00
tmp19Result = tmp19(tmp9(5374), 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-25 06:04:03 +00:00
let obj = gameId(closure_1_2[11]);
obj = { gameId, gameProfileModalChecks: obj, source: state(closure_1_2[12]).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;
2026-08-25 06:04:03 +00:00
const items1 = [tmp19Result, ];
2026-08-05 07:35:12 +00:00
const obj4 = { variant: "text-sm/medium", style: null, children: null };
obj4[1] = tmp.chipText;
obj4[2] = gameName;
2026-08-25 06:04:03 +00:00
items1[1] = callback(tmp2(4376).Text, obj4);
2026-08-05 07:35:12 +00:00
obj3[4] = items1;
2026-08-25 06:04:03 +00:00
return closure_3(tmp2(4371).MarkupText, obj3, state.key);
2026-07-20 16:05:17 +00:00
}
2026-08-25 06:04:03 +00:00
const tmp10 = gameId(4413);
tmp9 = gameId;
2026-07-20 16:05:17 +00:00
};