decord/source/modules/application_commands/native/ApplicationSectionHeader.tsx

68 lines
2.7 KiB
TypeScript
Raw Normal View History

// Module ID: 12400
// Function ID: 12401
2026-07-20 16:05:17 +00:00
// Name: ApplicationSectionHeader
// Dependencies: [19, 17, 2021, 21, 4560, 576, 504, 12235, 1114, 5587, 4556, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12400 (ApplicationSectionHeader)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 576 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import closure_4 from "trackCommunicationDisabled" /* 2021 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
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
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { applicationHeaderWrapper: null, applicationIcon: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flexDirection: "row", alignItems: "center", height: 32, backgroundColor: ThemesDefault.colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND, paddingHorizontal: 16 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { width: 16, height: 16, borderRadius: ThemesDefault.radii.sm, marginRight: 8 };
let closure_7 = createCacheKey.createStyles(createCacheKey);
const obj1 = { width: 16, height: 16, borderRadius: ThemesDefault.radii.sm, marginRight: 8 };
const result = require("set").fileFinishedImporting("modules/application_commands/native/ApplicationSectionHeader.tsx");
2026-07-20 16:05:17 +00:00
export default function ApplicationSectionHeader(section) {
section = section.section;
2026-07-23 10:11:24 +00:00
const guildId = section.guildId;
2026-08-24 06:08:38 +00:00
const tmp = callback2();
let obj = section(504);
2026-08-24 06:08:38 +00:00
const items = [closure_4];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => {
if (null != guildId) {
let botId;
2026-07-29 08:29:29 +00:00
if (section != null) {
botId = tmp2.botId;
2026-07-20 16:05:17 +00:00
}
if (null != botId) {
2026-08-24 06:08:38 +00:00
return closure_1_4.getMember(tmp, tmp2.botId);
2026-07-20 16:05:17 +00:00
}
}
});
const applicationCommandsIconSource = section(12235).getApplicationCommandsIconSource(section, stateFromStores);
2026-07-20 16:05:17 +00:00
let nick;
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
nick = stateFromStores.nick;
}
if (null != nick) {
let name = stateFromStores.nick;
2026-07-29 08:29:29 +00:00
} else if (section != null) {
2026-07-20 16:05:17 +00:00
name = section.name;
}
2026-07-29 08:29:29 +00:00
obj = { style: tmp.applicationHeaderWrapper, accessibilityLabel: null, children: null };
const intl = tmp2(1114).intl;
obj[1] = intl.formatToPlainString(section(1114).t["Ocw/sM"], { applicationName: name });
2026-07-29 08:29:29 +00:00
let tmp9 = null != applicationCommandsIconSource;
if (tmp9) {
obj = { style: null, source: null };
obj[0] = tmp.applicationIcon;
obj[1] = applicationCommandsIconSource;
tmp9 = callback(guildId(5587), obj);
2026-07-20 16:05:17 +00:00
}
const items1 = [tmp9, callback(section(4556).Text, { variant: "eyebrow", color: "interactive-text-default", children: name })];
2026-07-29 08:29:29 +00:00
obj[2] = items1;
2026-07-20 16:05:17 +00:00
return closure_6(View, obj);
};
export const APPLICATION_SECTION_HEADER_HEIGHT = 32;