decord/source/modules/launchpad/native/shared/ChannelSubtitle.tsx

70 lines
2.4 KiB
TypeScript
Raw Normal View History

// Module ID: 17023
// Function ID: 17024
2026-07-20 16:05:17 +00:00
// Name: ChannelSubtitle
// Dependencies: [19, 10150, 21, 16698, 4570, 16259, 10148, 2]
2026-07-20 16:05:17 +00:00
// Exports: renderChannelSubtitle
// Module 17023 (ChannelSubtitle)
import Text_Text from "Text/Text" /* 4570 */;
import getChannelSubtitleData from "getChannelSubtitleData" /* 16259 */;
import getLayoutStylesDefault from "getLayoutStyles" /* 16698 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-07-20 16:05:17 +00:00
function ChannelSubtitle(arg0) {
({ muted, textProps } = arg0);
({ connected, channelId, guildId, subtitle } = arg0);
const channelSubtitleData = getChannelSubtitleData.getChannelSubtitleData(subtitle);
2026-07-20 16:05:17 +00:00
if (null == channelSubtitleData) {
return null;
} else {
const obj2 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(textProps);
const obj3 = { content: channelSubtitleData.subtitle, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null };
2026-07-29 08:29:29 +00:00
let flag = muted;
if (muted == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
obj3.muted = flag;
obj3.channelId = channelId;
obj3.guildId = guildId;
obj3.disableAnimatedEmoji = !("voice" === channelSubtitleData.type && connected);
2026-07-20 16:05:17 +00:00
let str = "text-subtle";
if (muted) {
str = "text-muted";
}
obj3.color = str;
obj2.children = tmp(10148).renderMessagePreviewMarkup(obj3);
return jsx(tmp(4570).Text, {});
2026-07-20 16:05:17 +00:00
}
}
const SUBTITLE_OPACITY_NORMAL = fn(10150).SUBTITLE_OPACITY_NORMAL;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/launchpad/native/shared/ChannelSubtitle.tsx");
2026-07-20 16:05:17 +00:00
export const renderChannelSubtitle = function renderChannelSubtitle(arg0) {
({ subtitle, muted } = arg0);
if (null == subtitle) {
return null;
} else {
const obj2 = { variant: getLayoutStylesDefault().messagePreview.text.variant, color: "text-muted", lineClamp: 1, maxFontSizeMultiplier: 1.75, style: null };
2026-07-20 16:05:17 +00:00
let num = 1;
if (!muted) {
num = SUBTITLE_OPACITY_NORMAL;
}
const obj = { opacity: num };
obj2.style = obj;
2026-08-04 21:03:28 +00:00
if (typeof subtitle === "string") {
const obj3 = {};
const merged = Object.assign(obj2);
obj3.children = subtitle;
let tmp9 = jsx(Text_Text.Text, {});
2026-07-20 16:05:17 +00:00
} else {
const obj4 = { channelId: tmp, guildId: tmp2, subtitle, muted, connected: tmp3, textProps: obj2 };
tmp9 = <ChannelSubtitle channelId={tmp} guildId={tmp2} subtitle={subtitle} muted={muted} connected={tmp3} textProps={obj2} />;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp9;
2026-07-20 16:05:17 +00:00
}
};