decord/source/modules/user_profile/native/UserProfileAboutMeCardCommand.tsx

90 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-08-27 16:17:25 +00:00
// Module ID: 8965
// Function ID: 8966
// Dependencies: [19, 676, 21, 4445, 712, 4441, 4307, 8966, 698, 4653, 4412, 8973, 7199, 7201, 2]
2026-07-20 16:05:17 +00:00
2026-08-27 16:17:25 +00:00
// Module 8965
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
import { AnalyticEvents } from "ME" /* 676 */;
import { jsxs } from "jsxProd" /* 21 */;
2026-08-27 16:17:25 +00:00
import createCacheKey from "createCacheKey" /* 4445 */;
2026-08-24 06:08:38 +00:00
import importAllResult from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let obj = { commandClickable: null };
2026-08-24 06:08:38 +00:00
obj = { color: ThemesDefault.colors.MENTION_FOREGROUND, backgroundColor: ThemesDefault.colors.MENTION_BACKGROUND, marginEnd: ThemesDefault.space.PX_12, marginBottom: ThemesDefault.space.PX_12 };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
let closure_5 = createCacheKey.createStyles(obj);
2026-08-24 06:08:38 +00:00
const memoResult = importAllResult.memo(function UserProfileAboutMeCardCommand(channel) {
2026-07-23 10:11:24 +00:00
({ application: require, command } = channel);
channel = channel.channel;
2026-07-20 16:05:17 +00:00
const tmp = callback();
2026-07-23 10:11:24 +00:00
const items = ["/", command.displayName];
return jsxs(require(channel[5]).Text, {
2026-07-20 16:05:17 +00:00
variant: "text-md/bold",
onPress() {
2026-08-24 06:08:38 +00:00
let obj = closure_1_0(channel[6]);
2026-07-20 16:05:17 +00:00
const bestActiveInput = obj.getBestActiveInput();
2026-07-29 08:29:29 +00:00
obj = { channelId: channel.id, currentText: null, commandId: null, commandName: null, onOpenCustomKeyboard: null, onSetCommand: null };
let str;
if (bestActiveInput != null) {
str = bestActiveInput.getText();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = str;
({ id: obj4[2], displayName: obj4[3] } = command);
obj[4] = function onOpenCustomKeyboard(arg0) {
2026-07-20 16:05:17 +00:00
let openCustomKeyboardResult;
2026-07-29 08:29:29 +00:00
if (bestActiveInput != null) {
2026-07-20 16:05:17 +00:00
openCustomKeyboardResult = bestActiveInput.openCustomKeyboard(arg0);
}
return openCustomKeyboardResult;
};
2026-07-29 08:29:29 +00:00
obj[5] = function onSetCommand() {
2026-07-23 10:11:24 +00:00
let obj = command(channel[8]);
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (bestActiveInput != null) {
id = tmp3.id;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj = { application_id: id, command_id: closure_1_1.id, guild_id: closure_1_2.getGuildId() };
const merged = Object.assign(closure_2_0(channel[9]).collectChannelAnalyticsMetadata(closure_1_2));
obj.track(closure_2_3.POPULAR_APPLICATION_COMMAND_CLICKED, obj);
const obj3 = closure_2_0(channel[9]);
const tmp5 = closure_1_1;
const tmp6 = closure_1_2;
2026-08-26 06:04:24 +00:00
command(channel[10]).hideAllActionSheets();
2026-07-23 10:11:24 +00:00
command(channel[11])();
2026-07-29 08:29:29 +00:00
if (bestActiveInput != null) {
obj5.openSystemKeyboard();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (bestActiveInput != null) {
const applicationCommandManager = obj5.getApplicationCommandManager();
if (applicationCommandManager != null) {
obj = { channelId: null, command: null, section: null, location: null };
obj[0] = tmp6.id;
obj[1] = tmp5;
let applicationCommandSection = null;
if (null != tmp3) {
applicationCommandSection = tmp7(tmp2[12]).getApplicationCommandSection(tmp3);
const tmp7Result = tmp7(tmp2[12]);
}
obj[2] = applicationCommandSection;
obj[3] = tmp7(tmp2[13]).ApplicationCommandTriggerLocations.POPULAR_COMMANDS;
applicationCommandManager.setCommand(obj);
2026-07-20 16:05:17 +00:00
}
}
};
2026-08-24 06:08:38 +00:00
const result = closure_1_0(channel[7]).handleTapCommandMention(obj);
2026-07-20 16:05:17 +00:00
},
onLongPress() {
2026-08-24 06:08:38 +00:00
return closure_1_0(channel[7]).handleLongPressCommandMention(command.displayName, command.id);
2026-07-20 16:05:17 +00:00
},
style: callback().commandClickable,
children: items
});
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileAboutMeCardCommand.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;