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

84 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 15913
// Function ID: 15914
2026-07-20 16:05:17 +00:00
// Name: ChannelSubtitle
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 9681, 21, 15902, 4251, 15205, 9679, 2]
2026-07-20 16:05:17 +00:00
// Exports: renderChannelSubtitle
2026-08-05 07:35:12 +00:00
// Module 15913 (ChannelSubtitle)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import { SUBTITLE_OPACITY_NORMAL } from "hairlineWidth";
import { jsx } from "jsxProd";
const require = arg1;
2026-07-20 16:05:17 +00:00
function ChannelSubtitle(arg0) {
let channelId;
let connected;
let guildId;
let muted;
let subtitle;
let textProps;
({ muted, textProps } = arg0);
({ connected, channelId, guildId, subtitle } = arg0);
2026-08-05 07:35:12 +00:00
let obj = require(15205) /* getChannelSubtitleData */;
2026-07-20 16:05:17 +00:00
const channelSubtitleData = obj.getChannelSubtitleData(subtitle);
if (null == channelSubtitleData) {
return null;
} else {
obj = {};
const merged = Object.assign(textProps);
2026-07-29 08:29:29 +00:00
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;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = flag;
obj[2] = channelId;
obj[3] = guildId;
obj[4] = !("voice" === channelSubtitleData.type && connected);
2026-07-20 16:05:17 +00:00
let str = "text-subtle";
if (muted) {
str = "text-muted";
}
2026-07-29 08:29:29 +00:00
obj[5] = str;
2026-08-05 07:35:12 +00:00
obj.children = tmp(9679).renderMessagePreviewMarkup(obj);
return jsx(tmp(4251).Text, { content: null, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null });
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("modules/launchpad/native/shared/ChannelSubtitle.tsx");
2026-07-20 16:05:17 +00:00
export const renderChannelSubtitle = function renderChannelSubtitle(arg0) {
let muted;
let subtitle;
({ subtitle, muted } = arg0);
if (null == subtitle) {
return null;
} else {
2026-07-29 08:29:29 +00:00
let obj = { variant: null, color: "text-muted", lineClamp: 1, maxFontSizeMultiplier: 1.75, style: null };
2026-08-05 07:35:12 +00:00
obj[0] = importDefault(15902)().messagePreview.text.variant;
2026-07-20 16:05:17 +00:00
let num = 1;
if (!muted) {
num = SUBTITLE_OPACITY_NORMAL;
}
2026-07-29 08:29:29 +00:00
obj = { opacity: null };
obj[0] = num;
obj[4] = obj;
2026-08-04 21:03:28 +00:00
if (typeof subtitle === "string") {
2026-07-29 08:29:29 +00:00
obj = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj.children = subtitle;
2026-08-05 07:35:12 +00:00
let tmp9 = jsx(require(4251) /* Text */.Text, {});
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const 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} />;
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
}
};