decord/source/modules/message_request/native/RestrictedMessagePreviewHeader.tsx

104 lines
5.1 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 15821
// Function ID: 15822
2026-07-20 16:05:17 +00:00
// Name: RestrictedMessagePreviewHeader
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 17, 11688, 21, 4255, 712, 5595, 4094, 8677, 5623, 3955, 4223, 11844, 1959, 8683, 5851, 4460, 4797, 1236, 1297, 4251, 15804, 5646, 15822, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 15821 (RestrictedMessagePreviewHeader)
2026-07-29 08:29:29 +00:00
import Button from "Button";
import { View } from "PressableBase";
2026-07-23 10:11:24 +00:00
import { MOBILE_MESSAGE_REQUESTS_MODAL_KEY as closure_5 } from "MESSAGE_REQUEST_ACCEPT_CONFIRMATION_MODAL";
2026-07-29 08:29:29 +00:00
import jsxProd from "MessageRequestMutualServers";
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: closure_6, jsxs: error } = jsxProd);
createCacheKey = { container: null, avatar: null };
createCacheKey = { alignItems: "flex-start", gap: require("Themes").space.PX_8, paddingVertical: require("Themes").space.PX_12 };
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { marginBottom: require("Themes").space.PX_4 };
createCacheKey = createCacheKey.createStyles(createCacheKey);
let obj1 = { marginBottom: require("Themes").space.PX_4 };
2026-07-23 10:11:24 +00:00
let result = require("MESSAGE_REQUEST_ACCEPT_CONFIRMATION_MODAL").fileFinishedImporting("modules/message_request/native/RestrictedMessagePreviewHeader.tsx");
2026-07-20 16:05:17 +00:00
export default function RestrictedMessagePreviewHeader(channel) {
channel = channel.channel;
const user = channel.user;
2026-07-29 08:29:29 +00:00
let analyticsLocations;
let userTag;
const tmp = createCacheKey();
2026-07-23 10:11:24 +00:00
analyticsLocations = user(analyticsLocations[6])().analyticsLocations;
let obj = user(analyticsLocations[7]);
2026-07-20 16:05:17 +00:00
const name = obj.getName(user);
2026-07-23 10:11:24 +00:00
let obj1 = user(analyticsLocations[7]);
2026-07-29 08:29:29 +00:00
userTag = obj1.getUserTag(user, { decoration: "never", identifiable: "always" });
2026-07-20 16:05:17 +00:00
const items = [user.id, channel.id, analyticsLocations];
2026-07-23 10:11:24 +00:00
const callback = userTag.useCallback(() => {
2026-07-20 16:05:17 +00:00
user(analyticsLocations[8])({ userId: user.id, channelId: channel.id, sourceAnalyticsLocations: analyticsLocations });
}, items);
const items1 = [userTag];
const items2 = [user];
2026-07-23 10:11:24 +00:00
const callback1 = userTag.useCallback(() => {
2026-07-20 16:05:17 +00:00
channel(analyticsLocations[9]).copy(userTag);
const obj = channel(analyticsLocations[9]);
const result = channel(analyticsLocations[10]).presentUsernameCopied();
}, items1);
2026-07-29 08:29:29 +00:00
obj = { style: tmp.container, children: null };
2026-07-23 10:11:24 +00:00
const callback2 = userTag.useCallback(() => {
2026-07-20 16:05:17 +00:00
let obj = user(analyticsLocations[11]);
obj = {
user,
onPressMutualGuild(arg0) {
2026-08-05 07:35:12 +00:00
const result = callback(8683).trackUserProfileAction({ action: "PRESS_MUTUAL_GUILD" });
const obj = callback(8683);
callback(5851).transitionToGuild(arg0);
const obj2 = callback(5851);
callback2(4223).hideActionSheet();
const obj3 = callback2(4223);
callback2(4460).popWithKey(closure_5);
2026-07-20 16:05:17 +00:00
}
};
obj.openLazy(channel(analyticsLocations[13])(analyticsLocations[12], analyticsLocations.paths), "MutualGuildsActionSheet", obj);
}, items2);
2026-07-29 08:29:29 +00:00
obj = { accessibilityRole: "button", accessibilityLabel: null, onPress: null, children: null };
2026-07-23 10:11:24 +00:00
const intl = channel(analyticsLocations[18]).intl;
2026-07-29 08:29:29 +00:00
obj[1] = intl.string(channel(analyticsLocations[18]).t.iXAna6);
obj[2] = callback;
obj1 = { style: tmp.avatar, user, guildId: channel.guild_id, size: null, avatarDecoration: null };
obj1[3] = channel(analyticsLocations[19]).AvatarSizes.XXLARGE;
obj1[4] = user.avatarDecoration;
obj[3] = callback(channel(analyticsLocations[19]).Avatar, obj1);
2026-07-23 10:11:24 +00:00
const items3 = [callback(channel(analyticsLocations[17]).PressableOpacity, obj), , , , , ];
2026-07-29 08:29:29 +00:00
let obj2 = { accessibilityRole: "button", accessibilityLabel: null, onPress: null, children: null };
2026-07-23 10:11:24 +00:00
const intl2 = channel(analyticsLocations[18]).intl;
2026-07-29 08:29:29 +00:00
obj2[1] = intl2.string(channel(analyticsLocations[18]).t.iXAna6);
obj2[2] = callback;
obj2[3] = callback(channel(analyticsLocations[20]).Text, { variant: "heading-xxl/extrabold", color: "mobile-text-heading-primary", children: name });
2026-07-23 10:11:24 +00:00
items3[1] = callback(channel(analyticsLocations[17]).PressableOpacity, obj2);
2026-07-29 08:29:29 +00:00
const isProvisional = user.isProvisional;
let tmp11Result = !isProvisional;
if (!isProvisional) {
let obj3 = { accessibilityRole: "button", accessibilityHint: null, onPress: null, children: null };
const intl3 = tmp12(tmp3[18]).intl;
obj3[1] = intl3.string(tmp12(tmp3[18]).t.y5MwJy);
obj3[2] = callback1;
const obj4 = { variant: "heading-lg/medium", color: "text-default", children: null };
obj4[2] = userTag;
obj3[3] = tmp11(tmp12(tmp3[20]).Text, obj4);
tmp11Result = tmp11(tmp12(tmp3[17]).PressableOpacity, obj3);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[2] = tmp11Result;
const obj5 = { variant: "text-md/medium", color: "text-default", children: null };
const intl4 = tmp12(tmp3[18]).intl;
obj5[2] = intl4.formatToPlainString(channel(analyticsLocations[18]).t["Qvg+6+"], { username: name });
items3[3] = callback(channel(analyticsLocations[20]).Text, obj5);
const obj6 = { userId: user.id, onPress: callback2, iconSize: null, textVariant: "text-md/medium" };
obj6[2] = channel(analyticsLocations[22]).GuildIconSizes.XSMALL;
items3[4] = callback(user(analyticsLocations[21]), obj6);
2026-07-23 10:11:24 +00:00
items3[5] = callback(user(analyticsLocations[23]), { channel, user });
2026-07-29 08:29:29 +00:00
obj[1] = items3;
2026-07-20 16:05:17 +00:00
return closure_7(View, obj);
};