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

169 lines
6.6 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12716
// Function ID: 12717
2026-07-20 16:05:17 +00:00
// Name: UserProfileMutuals
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 8932, 5882, 21, 4380, 8935, 12160, 12476, 4347, 12166, 2009, 8930, 6066, 4949, 12509, 1297, 4376, 12167, 12176, 5885, 12161, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 12716 (UserProfileMutuals)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import { UserProfileSections } from "USER_PROFILE_TOOLTIP_DELAY" /* 8932 */;
import { DIVIDER_DOT } from "ARBITRARY_LARGE_OFFSET" /* 5882 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: closure_6, jsxs: error } = jsxProd);
let c8 = "text-sm/medium";
let c9 = "text-default";
let closure_10 = createCacheKey.createStyles({ container: { flexDirection: "row", columnGap: 4, flexWrap: "wrap" }, section: { flexDirection: "row", alignItems: "center", columnGap: 6 } });
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileMutuals.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileMutuals(user) {
user = user.user;
2026-07-23 10:11:24 +00:00
const guildId = user.guildId;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-23 10:11:24 +00:00
c3 = undefined;
2026-07-29 08:29:29 +00:00
const tmp = callback2();
2026-08-25 06:04:03 +00:00
let obj = user(8935);
2026-07-20 16:05:17 +00:00
const userProfileAnalyticsContext = obj.useUserProfileAnalyticsContext();
2026-07-29 08:29:29 +00:00
({ context: c2, trackUserProfileAction: c3 } = userProfileAnalyticsContext);
2026-08-25 06:04:03 +00:00
({ mutualFriends, mutualGuilds } = guildId(12160)(user));
if (guildId(12476)(user)) {
2026-07-29 08:29:29 +00:00
let tmp7 = null != mutualFriends;
if (tmp7) {
tmp7 = mutualFriends.length > 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp8 = null != mutualGuilds;
if (tmp8) {
tmp8 = mutualGuilds.length > 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp7) {
if (!tmp8) {
2026-07-20 16:05:17 +00:00
return null;
}
}
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.container;
let tmp9Result = null;
if (tmp7) {
const substr = mutualFriends.slice(0, 3);
const mapped = substr.map((user) => user.user);
obj = { style: null, accessibilityRole: "button", onPress: null, children: null };
obj[0] = tmp.section;
obj[2] = function onPress() {
2026-08-24 06:08:38 +00:00
const MUTUAL_FRIENDS = closure_1_4.MUTUAL_FRIENDS;
2026-07-29 08:29:29 +00:00
_undefined2({ action: "PRESS_SECTION", section: MUTUAL_FRIENDS });
let obj = guildId(_undefined[9]);
obj = {
user,
section: MUTUAL_FRIENDS,
guildId,
onPressMutualFriend(userId) {
callback({ action: "PRESS_MUTUAL_FRIEND" });
const obj = {};
const merged = Object.assign(closure_2);
obj.userId = userId;
2026-08-24 06:08:38 +00:00
closure_1_1(closure_1_2[12])(obj);
2026-07-29 08:29:29 +00:00
},
onPressMutualGuild(arg0) {
callback({ action: "PRESS_MUTUAL_GUILD" });
2026-08-24 06:08:38 +00:00
closure_1_0(closure_1_2[13]).transitionToGuild(arg0);
const obj = closure_1_0(closure_1_2[13]);
closure_1_1(closure_1_2[9]).hideActionSheet();
const obj2 = closure_1_1(closure_1_2[9]);
closure_1_1(closure_1_2[9]).hideActionSheet();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
obj.openLazy(user(_undefined[11])(_undefined[10], _undefined.paths), "UserProfileMutualsActionSheet", obj, "stack");
};
2026-08-24 06:08:38 +00:00
obj1 = { size: null, totalCount: null, names: null, children: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp2(1297).AvatarSizes.SIZE_16;
obj1[1] = mapped.length;
obj1[2] = mapped.map((username) => username.username);
2026-08-25 06:04:03 +00:00
obj1[3] = mapped.map((id) => callback(user(_undefined[16]).Avatar, { user: id, size: user(_undefined[16]).AvatarSizes.SIZE_16, guildId: "r" }, id.id));
const items = [callback(tmp2(12509).AvatarPile, obj1), ];
2026-07-29 08:29:29 +00:00
let obj2 = { variant: null, color: null, children: null };
obj2[0] = c8;
obj2[1] = c9;
2026-08-25 06:04:03 +00:00
obj2[2] = tmp5(12167)(mutualFriends.length);
items[1] = callback(tmp2(4376).Text, obj2);
2026-07-29 08:29:29 +00:00
obj[3] = items;
2026-08-25 06:04:03 +00:00
tmp9Result = tmp9(tmp2(4949).PressableOpacity, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items1 = [tmp9Result, , ];
let tmp15 = tmp7;
if (tmp7) {
tmp15 = tmp8;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp15) {
const obj3 = { variant: null, color: null, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: null };
obj3[0] = c8;
obj3[1] = c9;
obj3[4] = DIVIDER_DOT;
2026-08-25 06:04:03 +00:00
tmp15 = callback(tmp2(4376).Text, obj3);
2026-07-29 08:29:29 +00:00
}
items1[1] = tmp15;
tmp9Result = null;
if (tmp8) {
const substr1 = mutualGuilds.slice(0, 3);
const mapped1 = substr1.map((guild) => guild.guild);
const obj4 = { style: null, accessibilityRole: "button", onPress: null, children: null };
obj4[0] = tmp.section;
obj4[2] = function onPress() {
2026-08-24 06:08:38 +00:00
const MUTUAL_GUILDS = closure_1_4.MUTUAL_GUILDS;
2026-07-29 08:29:29 +00:00
_undefined2({ action: "PRESS_SECTION", section: MUTUAL_GUILDS });
let obj = guildId(_undefined[9]);
obj = {
user,
section: MUTUAL_GUILDS,
guildId,
onPressMutualFriend(userId) {
callback({ action: "PRESS_MUTUAL_FRIEND" });
const obj = {};
const merged = Object.assign(closure_2);
obj.userId = userId;
2026-08-24 06:08:38 +00:00
closure_1_1(closure_1_2[12])(obj);
2026-07-29 08:29:29 +00:00
},
onPressMutualGuild(arg0) {
callback({ action: "PRESS_MUTUAL_GUILD" });
2026-08-24 06:08:38 +00:00
closure_1_0(closure_1_2[13]).transitionToGuild(arg0);
const obj = closure_1_0(closure_1_2[13]);
closure_1_1(closure_1_2[9]).hideActionSheet();
const obj2 = closure_1_1(closure_1_2[9]);
closure_1_1(closure_1_2[9]).hideActionSheet();
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj.openLazy(user(_undefined[11])(_undefined[10], _undefined.paths), "UserProfileMutualsActionSheet", obj, "stack");
};
let tmp21 = !tmp7;
if (!tmp7) {
const obj5 = { size: null, totalCount: null, names: null, children: null };
2026-08-25 06:04:03 +00:00
obj5[0] = tmp2(5885).GuildIconSizes.XXSMALL;
2026-07-29 08:29:29 +00:00
obj5[1] = mapped1.length;
obj5[2] = mapped1.map((name) => name.name);
obj5[3] = mapped1.map((guild) => {
2026-08-24 06:08:38 +00:00
const obj = { guild, size: user(_undefined[20]).GuildIconSizes.XXSMALL };
2026-07-29 08:29:29 +00:00
return callback(guildId(_undefined[20]), obj, guild.id);
});
2026-08-25 06:04:03 +00:00
tmp21 = callback(tmp2(12176).GuildIconPile, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items2 = [tmp21, ];
const obj6 = { variant: null, color: null, children: null };
obj6[0] = c8;
obj6[1] = c9;
2026-08-25 06:04:03 +00:00
obj6[2] = tmp5(12161)(mutualGuilds.length);
items2[1] = callback(tmp2(4376).Text, obj6);
2026-07-29 08:29:29 +00:00
obj4[3] = items2;
2026-08-25 06:04:03 +00:00
tmp9Result = tmp9(tmp2(4949).PressableOpacity, obj4);
2026-07-29 08:29:29 +00:00
}
items1[2] = tmp9Result;
obj[1] = items1;
return closure_7(c3, obj);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
2026-08-25 06:04:03 +00:00
const tmp6 = guildId(12160)(user);
2026-07-20 16:05:17 +00:00
};