decord/source/modules/application_commands/native/ApplicationSectionHeader.tsx
2026-08-28 06:19:39 +00:00

67 lines
2.7 KiB
TypeScript

// Module ID: 11901
// Function ID: 11902
// Name: ApplicationSectionHeader
// Dependencies: [19, 17, 1993, 21, 4446, 712, 589, 11734, 1236, 5458, 4442, 2]
// Exports: default
// Module 11901 (ApplicationSectionHeader)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_4 from "trackCommunicationDisabled" /* 1993 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4446 */;
const require = arg1;
noopAll;
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { applicationHeaderWrapper: null, applicationIcon: null };
createCacheKey = { flexDirection: "row", alignItems: "center", height: 32, backgroundColor: ThemesDefault.colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND, paddingHorizontal: 16 };
createCacheKey[0] = createCacheKey;
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");
export default function ApplicationSectionHeader(section) {
section = section.section;
const guildId = section.guildId;
const tmp = callback2();
let obj = section(589);
const items = [closure_4];
const stateFromStores = obj.useStateFromStores(items, () => {
if (null != guildId) {
let botId;
if (section != null) {
botId = tmp2.botId;
}
if (null != botId) {
return closure_1_4.getMember(tmp, tmp2.botId);
}
}
});
const applicationCommandsIconSource = section(11734).getApplicationCommandsIconSource(section, stateFromStores);
let nick;
if (stateFromStores != null) {
nick = stateFromStores.nick;
}
if (null != nick) {
let name = stateFromStores.nick;
} else if (section != null) {
name = section.name;
}
obj = { style: tmp.applicationHeaderWrapper, accessibilityLabel: null, children: null };
const intl = tmp2(1236).intl;
obj[1] = intl.formatToPlainString(section(1236).t["Ocw/sM"], { applicationName: name });
let tmp9 = null != applicationCommandsIconSource;
if (tmp9) {
obj = { style: null, source: null };
obj[0] = tmp.applicationIcon;
obj[1] = applicationCommandsIconSource;
tmp9 = callback(guildId(5458), obj);
}
const items1 = [tmp9, callback(section(4442).Text, { variant: "eyebrow", color: "interactive-text-default", children: name })];
obj[2] = items1;
return closure_6(View, obj);
};
export const APPLICATION_SECTION_HEADER_HEIGHT = 32;