decord/source/modules/launchpad/native/shared/ChannelSubtitle.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

79 lines
2.7 KiB
TypeScript

// Module ID: 16991
// Function ID: 16992
// Name: ChannelSubtitle
// Dependencies: [19, 10123, 21, 16980, 4556, 16229, 10121, 2]
// Exports: renderChannelSubtitle
// Module 16991 (ChannelSubtitle)
import noopAll from "noop" /* 19 */;
import Text from "Text" /* 4556 */;
import getChannelSubtitleData from "getChannelSubtitleData" /* 16229 */;
import getLayoutStyleDefault from "getLayoutStyle" /* 16980 */;
import { SUBTITLE_OPACITY_NORMAL } from "hairlineWidth" /* 10123 */;
import { jsx } from "jsxProd" /* 21 */;
require = arg1;
function ChannelSubtitle(arg0) {
({ muted, textProps } = arg0);
({ connected, channelId, guildId, subtitle } = arg0);
let obj = getChannelSubtitleData;
const channelSubtitleData = obj.getChannelSubtitleData(subtitle);
if (null == channelSubtitleData) {
return null;
} else {
obj = {};
const merged = Object.assign(textProps);
obj = { content: null, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null };
obj[0] = channelSubtitleData.subtitle;
let flag = muted;
if (muted == null) {
flag = false;
}
obj[1] = flag;
obj[2] = channelId;
obj[3] = guildId;
obj[4] = !("voice" === channelSubtitleData.type && connected);
let str = "text-subtle";
if (muted) {
str = "text-muted";
}
obj[5] = str;
obj.children = tmp(10121).renderMessagePreviewMarkup(obj);
return jsx(tmp(4556).Text, { content: null, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null });
}
}
noopAll;
const result = require("set").fileFinishedImporting("modules/launchpad/native/shared/ChannelSubtitle.tsx");
export const renderChannelSubtitle = function renderChannelSubtitle(arg0) {
({ subtitle, muted } = arg0);
if (null == subtitle) {
return null;
} else {
let obj = { variant: null, color: "text-muted", lineClamp: 1, maxFontSizeMultiplier: 1.75, style: null };
obj[0] = getLayoutStyleDefault().messagePreview.text.variant;
let num = 1;
if (!muted) {
num = SUBTITLE_OPACITY_NORMAL;
}
obj = { opacity: null };
obj[0] = num;
obj[4] = obj;
if (typeof subtitle === "string") {
obj = {};
const merged = Object.assign(obj);
obj.children = subtitle;
let tmp9 = jsx(Text.Text, {});
} else {
obj1 = { channelId: null, guildId: null, subtitle: null, muted: null, connected: null, textProps: null };
obj1[0] = tmp;
obj1[1] = tmp2;
obj1[2] = subtitle;
obj1[3] = muted;
obj1[4] = tmp3;
obj1[5] = obj;
tmp9 = <ChannelSubtitle channelId={null} guildId={null} subtitle={null} muted={null} connected={null} textProps={null} />;
}
return tmp9;
}
};