Files
2026-07-28 01:06:53 +03:00

136 lines
8.6 KiB
TypeScript

/* Metro module 8768; source: modules/user_profile/native/UserProfileAboutMeCardCommand.tsx; dependencies: [31, 661, 33, 4501, 697, 4573, 4015, 8769, 683, 4863, 4080, 8776, 5065, 5068, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import NavigateToLastChannel from '../../main_tabs_v2/native/navigateToLastChannel.tsx'; /* Metro dependency 8776 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as MarkupReactCommandRuleModule from '../../markup/native/MarkupReactCommandRule.tsx'; /* Metro dependency 8769 */
function _fun68594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:6, offset: 0x01c55540, size: 305 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const MENTION_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MENTION_FOREGROUND;
object2.color = MENTION_FOREGROUND;
const MENTION_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MENTION_BACKGROUND;
object2.backgroundColor = MENTION_BACKGROUND;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.marginEnd = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.marginBottom = PX_12;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{commandClickable: object2}]);
value = value.memo(UserProfileAboutMeCardCommand);
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileAboutMeCardCommand.tsx');
exports.default = value;
function UserProfileAboutMeCardCommand({application, command, channel}) { // fn#68595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:358, offset: 0x01c55671, size: 151 bytes, params: 2, frame: 17
const styles = useStyles();
const Text = (TextModule).Text;
return (
<Text
variant="text-md/bold"
onPress={onPress_68596}
onLongPress={onLongPress_68599}
style={styles.commandClickable}
>
{'/'}
{command.displayName}
</Text>
);
function UserProfileAboutMeCardCommandOnPress() { // fn#68596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:498, owner: UserProfileAboutMeCardCommand.onPress, offset: 0x01c55708, size: 172 bytes, params: 1, frame: 18
var environment;
let value = environment.__proto__;
value = undefined;
const bestActiveInput = (ChatInputUtilsModule).getBestActiveInput();
const handleTapCommandMention = MarkupReactCommandRuleModule.handleTapCommandMention;
const object = {};
object.channelId = channel.id;
object.currentText = (bestActiveInput == null ? value : bestActiveInput.getText()) ?? '';
const commandBinding = command;
object.commandId = commandBinding.id;
object.commandName = commandBinding.displayName;
object.onOpenCustomKeyboard = onOpenCustomKeyboard;
object.onSetCommand = onSetCommand;
Reflect.apply(handleTapCommandMention, MarkupReactCommandRuleModule, [object]);
return value;
function onPressOnOpenCustomKeyboard(a0) { // fn#68597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:704, owner: UserProfileAboutMeCardCommand.onPress.onOpenCustomKeyboard, offset: 0x01c557b4, size: 38 bytes, params: 2, frame: 12
return env0_0?.openCustomKeyboard(a0);
}
function onPressOnSetCommand() { // fn#68598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:759, owner: UserProfileAboutMeCardCommand.onPress.onSetCommand, offset: 0x01c557da, size: 383 bytes, params: 1, frame: 21
var r1;
var r3;
var r5;
var applicationCommandManager;
var setCommand;
var moduleValue2;
const value2 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const POPULAR_APPLICATION_COMMAND_CLICKED = AnalyticEvents.POPULAR_APPLICATION_COMMAND_CLICKED;
let object = {};
const applicationBinding = application;
const value4 = null;
object.application_id = value4 == applicationBinding ? value2 : application.id;
object.command_id = command.id;
const channelBinding = channel;
object.guild_id = channelBinding.getGuildId();
copyDataProperties(object, AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), channelBinding);
Reflect.apply(track, defaultImport, [POPULAR_APPLICATION_COMMAND_CLICKED, object]);
(ActionSheetActionCreators).hideActionSheet();
(NavigateToLastChannel)();
if (value4 != env0_0) {
env0_0.openSystemKeyboard();
}
const value6 = value4 == env0_0;
if (value6) {
r1 = value6;
r3 = value2;
} else {
applicationCommandManager = env0_0.getApplicationCommandManager();
r1 = value4 == applicationCommandManager;
r3 = applicationCommandManager;
}
if (!r1) {
setCommand = r3.setCommand;
object = {};
object.channelId = channel.id;
object.command = command;
if (value4 != application) {
moduleValue2 = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
r5 = moduleValue2.getApplicationCommandSection(application);
} else {
r5 = value4;
}
object.section = r5;
object.location = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.POPULAR_COMMANDS;
Reflect.apply(setCommand, r3, [object]);
}
return value2;
}
}
function UserProfileAboutMeCardCommandOnLongPress() { // fn#68599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8953:1258, owner: UserProfileAboutMeCardCommand.onLongPress, offset: 0x01c55959, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(8769) /* metro dependency 8769: MarkupReactCommandRule */;
const handleLongPressCommandMention = value.handleLongPressCommandMention;
const commandBinding = command;
return Reflect.apply(handleLongPressCommandMention, value, [commandBinding.displayName, commandBinding.id]);
}
}
}
global.__d(_fun68594, 8768, [31, 661, 33, 4501, 697, 4573, 4015, 8769, 683, 4863, 4080, 8776, 5065, 5068,
2]) /* metro module 8768, dependencies: [31, 661, 33, 4501, 697, 4573, 4015, 8769, 683, 4863, 4080, 8776, 5065, 5068, 2] */;