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

70 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 11470
// Function ID: 89013
2026-07-20 16:05:17 +00:00
// Name: ApplicationSectionHeader
2026-07-28 08:39:19 +00:00
// Dependencies: [31, 27, 1918, 33, 4165, 689, 566, 11367, 1212, 5119, 4161, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-28 08:39:19 +00:00
// Module 11470 (ApplicationSectionHeader)
2026-07-23 10:11:24 +00:00
import "result";
import { View } from "get ActivityIndicator";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_5;
let closure_6;
const require = arg1;
({ jsx: closure_5, jsxs: closure_6 } = jsxProd);
_createForOfIteratorHelperLoose = {};
_createForOfIteratorHelperLoose = { flexDirection: "row", alignItems: "center", height: 32, backgroundColor: require("_createForOfIteratorHelperLoose").colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND, paddingHorizontal: 16 };
_createForOfIteratorHelperLoose.applicationHeaderWrapper = _createForOfIteratorHelperLoose;
let obj1 = { width: 16, height: 16, borderRadius: require("_createForOfIteratorHelperLoose").radii.sm, marginRight: 8 };
_createForOfIteratorHelperLoose.applicationIcon = obj1;
_createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose.createStyles(_createForOfIteratorHelperLoose);
const result = require("_isNativeReflectConstruct").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 = _createForOfIteratorHelperLoose();
let obj = section(566);
const items = [_isNativeReflectConstruct];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => {
if (null != guildId) {
let botId;
if (null != section) {
botId = section.botId;
}
if (null != botId) {
2026-07-23 10:11:24 +00:00
return outer1_4.getMember(guildId, section.botId);
2026-07-20 16:05:17 +00:00
}
}
});
2026-07-28 08:39:19 +00:00
let obj1 = section(11367);
2026-07-20 16:05:17 +00:00
const applicationCommandsIconSource = obj1.getApplicationCommandsIconSource(section, stateFromStores);
let nick;
if (null != stateFromStores) {
nick = stateFromStores.nick;
}
if (null != nick) {
let name = stateFromStores.nick;
} else if (null != section) {
name = section.name;
}
obj = { style: tmp.applicationHeaderWrapper };
2026-07-23 10:11:24 +00:00
const intl = section(1212).intl;
2026-07-20 16:05:17 +00:00
obj = { applicationName: name };
2026-07-23 10:11:24 +00:00
obj.accessibilityLabel = intl.formatToPlainString(section(1212).t["Ocw/sM"], obj);
2026-07-20 16:05:17 +00:00
let tmp7 = null != applicationCommandsIconSource;
if (tmp7) {
obj1 = { style: tmp.applicationIcon, source: applicationCommandsIconSource };
2026-07-28 08:39:19 +00:00
tmp7 = callback(guildId(5119), obj1);
2026-07-20 16:05:17 +00:00
}
const items1 = [tmp7, ];
2026-07-23 10:11:24 +00:00
const obj2 = { variant: "eyebrow", color: "interactive-text-default", children: name };
2026-07-28 08:39:19 +00:00
items1[1] = callback(section(4161).Text, obj2);
2026-07-20 16:05:17 +00:00
obj.children = items1;
return closure_6(View, obj);
};
export const APPLICATION_SECTION_HEADER_HEIGHT = 32;