Files
discord-decomp/modules/markup/native/MarkupInlineChannelMentionRules.tsx
T
2026-11-01 12:12:55 +02:00

84 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Metro module 10292 (f10293).
import { smartOutput } from "../MarkupRulesUtils";
import { LegacyText } from "../../../design/void/native";
function $mk84356($env) {
return function(a0, a1, a2) {
let r6, r8;
L5: {
const iconType = a0.iconType;
r6 = void 0;
r8 = void 0;
switch (iconType) {
case "text":
case "text-nsfw":
case "text-spoiler":
case "announcement":
case "announcement-nsfw":
case "announcement-spoiler":
case "forum":
case "forum-nsfw":
case "forum-spoiler":
case "media":
case "media-nsfw":
r8 = "#";
r6 = void 0;
break L5;
case "thread":
case "post":
r6 = "\"";
r8 = "\"";
break L5;
case "message":
r8 = $env[0];
r6 = void 0;
break L5;
case "voice":
case "voice-locked":
case "voice-nsfw":
case "voice-spoiler":
case "stage":
case "stage-locked":
case "locked":
case "guide":
case "home":
case "browse":
case "customize":
case "linked-roles":
break L5;
default:
const r11 = $env.$parent;
(0, r11[0])(r11[1][4]).assertNever(iconType);
r6 = void 0;
r8 = void 0;
}
}
const r7 = $env.$parent;
return (0, r7[2])((0, r7[0])(r7[1][3]).LegacyText, {
children: [r8, (0, r7[0])(r7[1][2]).smartOutput(a0, a1, a2), r6]
}, a2.key);
};
}
let env6874;
let env6875;
const r3 = env6874 = {};
const r17 = env6875 = {
$parent: r3
};
const c6875_0 = "💬";
export function inlineChannelMentionReact(a0, a1, a2) {
return a0.inContent == null ? smartOutput(a0, a1, a2) : <LegacyText key={a2.key}>
{a1(a0.inContent, a2)}
{" › "}
{smartOutput(a0, a1, a2)}
</LegacyText>;
}
export function createInlineChannelReact(r2 = "💬") {
let env17845;
const r1 = env17845 = {
$parent: env6874
};
env17845[0] = r2;
return $mk84356(r1);
}
export const inlineChannelReact = $mk84356(r17);