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

64 lines
2.5 KiB
TypeScript
Raw Normal View History

// Module ID: 12489
// Function ID: 12490
2026-07-20 16:05:17 +00:00
// Name: ApplicationSectionHeader
// Dependencies: [19, 17, 2021, 21, 4606, 576, 504, 12324, 1114, 5638, 4602, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12489 (ApplicationSectionHeader)
import nativeDefault from "native" /* 576 */;
import noop from "module_19" /* 19 */;
import GuildMemberStore from "GuildMemberStore" /* 2021 */;
2026-07-23 10:11:24 +00:00
const require = fn;
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd);
const createStyles = fn(4606);
const obj2 = { applicationHeaderWrapper: { flexDirection: "row", alignItems: "center", height: 32, backgroundColor: nativeDefault.colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND, paddingHorizontal: 16 }, applicationIcon: null };
let size = { width: 16, height: 16, borderRadius: nativeDefault.radii.sm, marginRight: 8 };
obj2.applicationIcon = size;
let closure_7 = createStyles.createStyles(obj2);
size = fn(2);
const result = size.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;
const tmp = closure_7();
const items = [GuildMemberStore];
const stateFromStores = section(504).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
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) {
return GuildMemberStore.getMember(tmp, tmp2.botId);
2026-07-20 16:05:17 +00:00
}
}
});
const obj = section(504);
const applicationCommandsIconSource = section(12324).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;
}
const obj3 = { style: tmp.applicationHeaderWrapper, accessibilityLabel: null, children: null };
const intl = tmp2(1114).intl;
obj3.accessibilityLabel = intl.formatToPlainString(section(1114).t["Ocw/sM"], { applicationName: name });
2026-07-29 08:29:29 +00:00
let tmp9 = null != applicationCommandsIconSource;
if (tmp9) {
const obj4 = { style: tmp.applicationIcon, source: applicationCommandsIconSource };
tmp9 = closure_5(guildId(5638), obj4);
2026-07-20 16:05:17 +00:00
}
const items1 = [tmp9, closure_5(section(4602).Text, { variant: "eyebrow", color: "interactive-text-default", children: name })];
obj3.children = items1;
return closure_6(View, obj3);
2026-07-20 16:05:17 +00:00
};
export const APPLICATION_SECTION_HEADER_HEIGHT = 32;