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

142 lines
5.7 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 12393
// Function ID: 12394
2026-07-20 16:05:17 +00:00
// Name: UserProfileIncomingFriendRequest
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 17, 21, 4255, 712, 8729, 8682, 5595, 12394, 4444, 5601, 4251, 1236, 1297, 1416, 12395, 4665, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 12393 (UserProfileIncomingFriendRequest)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import { View } from "set";
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { container: { rowGap: 16, flexDirection: "column" }, buttons: { flexDirection: "row", columnGap: 12 }, gameIcon: { paddingTop: 2 }, friendRequestNote: null };
createCacheKey = { borderWidth: 1, borderColor: require("Themes").colors.BORDER_STRONG };
createCacheKey[3] = createCacheKey;
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("modules/user_profile/native/UserProfileIncomingFriendRequest.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileIncomingFriendRequest(style) {
let applicationId;
let channelId;
let guildId;
let isGameRelationship;
let showUserProfile;
let user;
({ user, isGameRelationship } = style);
({ channelId, guildId } = style);
if (isGameRelationship === undefined) {
isGameRelationship = false;
}
({ applicationId, showUserProfile } = style);
2026-07-29 08:29:29 +00:00
let items4;
2026-07-23 10:11:24 +00:00
let trackUserProfileAction;
let acceptFriendRequest;
let cancelFriendRequest;
2026-07-20 16:05:17 +00:00
let getOrFetchApplication;
2026-07-29 08:29:29 +00:00
items4 = createCacheKey();
let tmp = items4;
let userResult = trackUserProfileAction;
2026-07-23 10:11:24 +00:00
let obj = isGameRelationship(trackUserProfileAction[6]);
trackUserProfileAction = obj.useUserProfileAnalyticsContext().trackUserProfileAction;
let obj1 = isGameRelationship(trackUserProfileAction[8]);
2026-07-29 08:29:29 +00:00
obj = { userId: user.id, applicationId, isGameRelationship, location: items4(trackUserProfileAction[7])().newestAnalyticsLocation, onConfirm: showUserProfile, onCancel: showUserProfile };
2026-07-20 16:05:17 +00:00
const friendRequestActions = obj1.useFriendRequestActions(obj);
2026-07-23 10:11:24 +00:00
acceptFriendRequest = friendRequestActions.acceptFriendRequest;
cancelFriendRequest = friendRequestActions.cancelFriendRequest;
2026-07-29 08:29:29 +00:00
let obj3 = items4(trackUserProfileAction[9]);
2026-07-20 16:05:17 +00:00
let name = obj3.useName(guildId, channelId, user);
const items = [acceptFriendRequest, isGameRelationship, trackUserProfileAction];
2026-07-29 08:29:29 +00:00
let Button = acceptFriendRequest.useCallback(() => {
2026-07-20 16:05:17 +00:00
acceptFriendRequest();
let str = "ACCEPT_FRIEND_REQUEST";
if (isGameRelationship) {
str = "ACCEPT_GAME_FRIEND_REQUEST";
}
2026-07-29 08:29:29 +00:00
trackUserProfileAction({ action: str });
2026-07-20 16:05:17 +00:00
}, items);
const items1 = [cancelFriendRequest, isGameRelationship, trackUserProfileAction];
2026-07-29 08:29:29 +00:00
let tmp8 = null;
2026-07-23 10:11:24 +00:00
const callback = acceptFriendRequest.useCallback(() => {
2026-07-20 16:05:17 +00:00
cancelFriendRequest();
let str = "IGNORE_FRIEND_REQUEST";
if (isGameRelationship) {
str = "IGNORE_GAME_FRIEND_REQUEST";
}
2026-07-29 08:29:29 +00:00
trackUserProfileAction({ action: str });
2026-07-20 16:05:17 +00:00
}, items1);
2026-07-23 10:11:24 +00:00
let obj4 = isGameRelationship(trackUserProfileAction[10]);
2026-07-20 16:05:17 +00:00
getOrFetchApplication = obj4.useGetOrFetchApplication(applicationId);
if (null != applicationId) {
2026-07-29 08:29:29 +00:00
if (tmp8 == getOrFetchApplication) {
2026-07-20 16:05:17 +00:00
return null;
}
}
2026-07-29 08:29:29 +00:00
obj = { style: items2, children: null };
items2 = [items4.container, items4(trackUserProfileAction[5])().card, style.style];
let Text = tmp4(userResult[11]).Text;
obj1 = { variant: "text-sm/semibold", color: "text-default", children: null };
const intl = tmp4(userResult[12]).intl;
const format = intl.format;
let intl2 = tmp4(userResult[12]).t;
2026-07-20 16:05:17 +00:00
if (null != applicationId) {
2026-07-29 08:29:29 +00:00
isGameRelationship = isGameRelationship ? intl2.syHjLL : intl2.V15uUI;
let obj2 = { username: null, applicationName: null, applicationIcon: null };
obj2[0] = name;
tmp8 = getOrFetchApplication == tmp8;
name = undefined;
if (!tmp8) {
name = getOrFetchApplication.name;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2[1] = name;
obj2[2] = function applicationIcon() {
let tmp2 = null;
2026-07-20 16:05:17 +00:00
if (null != getOrFetchApplication) {
2026-07-29 08:29:29 +00:00
let obj = { source: null, size: null, style: null };
obj = { id: null, icon: null };
({ id: obj3[0], icon: obj3[1] } = tmp);
obj[0] = items4(trackUserProfileAction[14]).getApplicationIconSource(obj);
obj[1] = isGameRelationship(trackUserProfileAction[13]).AvatarSizes.XXSMALL;
obj[2] = items4.gameIcon;
tmp2 = getOrFetchApplication(isGameRelationship(trackUserProfileAction[13]).Avatar, obj, tmp.id);
const obj2 = items4(trackUserProfileAction[14]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj1[2] = format(isGameRelationship, obj2);
2026-07-20 16:05:17 +00:00
let tmp15 = obj1;
} else {
2026-07-29 08:29:29 +00:00
obj3 = { username: null };
obj3[0] = name;
obj1[2] = format(intl2.uIomXw, obj3);
2026-07-20 16:05:17 +00:00
tmp15 = obj1;
}
2026-07-29 08:29:29 +00:00
const items3 = [getOrFetchApplication(Text, tmp15), , ];
obj4 = { userId: user.id, styles: items4.friendRequestNote, analyticsLocation: "User Profile" };
items3[1] = getOrFetchApplication(tmp(userResult[15]), obj4);
const obj5 = { style: items4.buttons, children: null };
const obj6 = { size: "sm", variant: "primary", text: null, onPress: null };
intl2 = tmp4(userResult[12]).intl;
obj6[2] = intl2.string(isGameRelationship(userResult[12]).t.Zcibdf);
obj6[3] = Button;
items4 = [getOrFetchApplication(isGameRelationship(userResult[16]).Button, obj6), ];
Button = tmp4(userResult[16]).Button;
const obj7 = { size: "sm", variant: "secondary", text: null, onPress: null };
obj1 = tmp4(userResult[12]).intl;
user = obj1.string;
userResult = user(tmp4(userResult[12]).t.xuio0C);
obj7[2] = userResult;
obj7[3] = callback;
tmp = tmp14(Button, obj7);
2026-07-20 16:05:17 +00:00
items4[1] = tmp;
2026-07-29 08:29:29 +00:00
obj5[1] = items4;
Text = tmp12(tmp13, obj5);
2026-07-20 16:05:17 +00:00
items3[2] = Text;
2026-07-29 08:29:29 +00:00
obj[1] = items3;
closure_6(cancelFriendRequest, obj);
2026-07-20 16:05:17 +00:00
};