67 lines
2.7 KiB
TypeScript
67 lines
2.7 KiB
TypeScript
// Module ID: 11963
|
|
// Function ID: 11964
|
|
// Name: ApplicationSectionHeader
|
|
// Dependencies: [19, 17, 1992, 21, 4380, 712, 589, 11799, 1236, 5374, 4376, 2]
|
|
// Exports: default
|
|
|
|
// Module 11963 (ApplicationSectionHeader)
|
|
import noopAll from "noop" /* 19 */;
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
import { View } from "get ActivityIndicator" /* 17 */;
|
|
import closure_4 from "trackCommunicationDisabled" /* 1992 */;
|
|
import jsxProd from "jsxProd" /* 21 */;
|
|
import createCacheKey from "createCacheKey" /* 4380 */;
|
|
|
|
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(11799).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(5374), obj);
|
|
}
|
|
const items1 = [tmp9, callback(section(4376).Text, { variant: "eyebrow", color: "interactive-text-default", children: name })];
|
|
obj[2] = items1;
|
|
return closure_6(View, obj);
|
|
};
|
|
export const APPLICATION_SECTION_HEADER_HEIGHT = 32;
|