2026-07-27 11:26:19 +00:00
|
|
|
// Module ID: 15563
|
|
|
|
|
// Function ID: 119761
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: UserProfileYourFriendsCard
|
2026-07-27 11:26:19 +00:00
|
|
|
// Dependencies: [57, 31, 27, 5892, 3768, 1850, 653, 33, 1273, 4131, 689, 566, 11989, 8748, 22, 1327, 4661, 1212, 4127, 5512, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-07-27 11:26:19 +00:00
|
|
|
// Module 15563 (UserProfileYourFriendsCard)
|
2026-07-23 10:11:24 +00:00
|
|
|
import _slicedToArray from "_slicedToArray";
|
|
|
|
|
import result from "result";
|
|
|
|
|
import { View } from "get ActivityIndicator";
|
|
|
|
|
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
|
|
|
|
|
import closure_7 from "_isNativeReflectConstruct";
|
|
|
|
|
import closure_8 from "_isNativeReflectConstruct";
|
|
|
|
|
import { RelationshipTypes } from "ME";
|
|
|
|
|
import jsxProd from "jsxProd";
|
|
|
|
|
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
|
|
|
|
|
|
|
|
|
|
let closure_10;
|
|
|
|
|
let closure_11;
|
|
|
|
|
let require = arg1;
|
|
|
|
|
({ jsx: closure_10, jsxs: closure_11 } = jsxProd);
|
|
|
|
|
let obj = { direction: require("Button").CutoutDirection.RIGHT, inset: -4 };
|
2026-07-20 16:05:17 +00:00
|
|
|
let closure_12 = Object.freeze(obj);
|
|
|
|
|
obj = {};
|
2026-07-23 10:11:24 +00:00
|
|
|
obj = { flex: 1, flexDirection: "row", alignItems: "center", padding: 16, borderRadius: require("_createForOfIteratorHelperLoose").radii.lg };
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.pressable = obj;
|
|
|
|
|
obj.label = { flex: 1 };
|
2026-07-23 10:11:24 +00:00
|
|
|
obj.facepile = { flexDirection: "row", alignItems: "center", marginLeft: "auto", marginRight: 8 };
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.avatars = { flexDirection: "row" };
|
2026-07-23 10:11:24 +00:00
|
|
|
let closure_13 = _createForOfIteratorHelperLoose.createStyles(obj);
|
|
|
|
|
const result = require("get ActivityIndicator").fileFinishedImporting("modules/user_profile/native/UserProfileYourFriendsCard.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function UserProfileYourFriendsCard(arg0) {
|
|
|
|
|
let navigateToFriends;
|
|
|
|
|
let style;
|
|
|
|
|
({ navigateToFriends, style } = arg0);
|
2026-07-23 10:11:24 +00:00
|
|
|
const tmp = callback3();
|
|
|
|
|
const require = tmp;
|
|
|
|
|
const tmp2 = stateFromStoresArray(stateFromStoresArray1.useState([]), 2);
|
2026-07-20 16:05:17 +00:00
|
|
|
const first = tmp2[0];
|
2026-07-23 10:11:24 +00:00
|
|
|
const dependencyMap = tmp2[1];
|
|
|
|
|
let obj = require(566) /* initialize */;
|
|
|
|
|
let items = [_isNativeReflectConstruct];
|
|
|
|
|
stateFromStoresArray = obj.useStateFromStoresArray(items, () => {
|
|
|
|
|
const userAffinities = outer1_6.getUserAffinities();
|
2026-07-20 16:05:17 +00:00
|
|
|
return userAffinities.map((otherUserId) => otherUserId.otherUserId);
|
|
|
|
|
});
|
|
|
|
|
const items1 = [closure_7];
|
2026-07-23 10:11:24 +00:00
|
|
|
stateFromStoresArray1 = require(566) /* initialize */.useStateFromStoresArray(items1, () => outer1_7.getFriendIDs());
|
|
|
|
|
const obj2 = require(566) /* initialize */;
|
2026-07-27 11:26:19 +00:00
|
|
|
const gameRelationshipsByType = require(11989) /* useGameRelationshipsForUserByType */.useGameRelationshipsByType(RelationshipTypes.FRIEND);
|
2026-07-23 10:11:24 +00:00
|
|
|
const effect = stateFromStoresArray1.useEffect(() => {
|
2026-07-25 08:10:48 +00:00
|
|
|
const userAffinitiesV2 = tmp(8748).fetchUserAffinitiesV2();
|
2026-07-20 16:05:17 +00:00
|
|
|
}, []);
|
|
|
|
|
const items2 = [stateFromStoresArray, stateFromStoresArray1, gameRelationshipsByType];
|
2026-07-23 10:11:24 +00:00
|
|
|
const effect1 = stateFromStoresArray1.useEffect(() => {
|
|
|
|
|
const obj = first(22);
|
|
|
|
|
const found = first(22).chain(stateFromStoresArray).filter((arg0) => outer1_4.includes(arg0));
|
|
|
|
|
const chainResult = first(22).chain(stateFromStoresArray);
|
|
|
|
|
const mapped = found.take(5).map(outer1_8.getUser);
|
2026-07-20 16:05:17 +00:00
|
|
|
const takeResult = found.take(5);
|
2026-07-23 10:11:24 +00:00
|
|
|
let valueResult = mapped.filter(tmp(1327).isNotNullish).value();
|
2026-07-20 16:05:17 +00:00
|
|
|
if (valueResult.length >= 5) {
|
2026-07-23 10:11:24 +00:00
|
|
|
dependencyMap(valueResult);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj3 = first(22);
|
|
|
|
|
const mapped1 = first(22).chain(gameRelationshipsByType).map((id) => id.id);
|
|
|
|
|
const chainResult1 = first(22).chain(gameRelationshipsByType);
|
2026-07-20 16:05:17 +00:00
|
|
|
const uniqResult = mapped1.uniq();
|
2026-07-23 10:11:24 +00:00
|
|
|
const mapped2 = mapped1.uniq().take(5 - valueResult.length).map(outer1_8.getUser);
|
2026-07-20 16:05:17 +00:00
|
|
|
const takeResult1 = mapped1.uniq().take(5 - valueResult.length);
|
2026-07-23 10:11:24 +00:00
|
|
|
valueResult = mapped2.filter(tmp(1327).isNotNullish).value();
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [];
|
|
|
|
|
HermesBuiltin.arraySpread(valueResult, HermesBuiltin.arraySpread(valueResult, 0));
|
2026-07-23 10:11:24 +00:00
|
|
|
dependencyMap(items);
|
|
|
|
|
const iter2 = mapped2.filter(tmp(1327).isNotNullish);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items2);
|
|
|
|
|
const items3 = [first, , ];
|
|
|
|
|
({ avatars: arr4[1], facepile: arr4[2] } = tmp);
|
2026-07-23 10:11:24 +00:00
|
|
|
const memo = stateFromStoresArray1.useMemo(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let obj = { style: tmp.facepile };
|
|
|
|
|
obj = {
|
|
|
|
|
style: tmp.avatars,
|
|
|
|
|
children: first.map((id) => {
|
|
|
|
|
let obj = { style: { transform: items } };
|
2026-07-23 10:11:24 +00:00
|
|
|
obj = { translateX: 4 * (outer1_1.length - 1 - arg1) };
|
|
|
|
|
items = [obj];
|
|
|
|
|
obj = { user: id, guildId: undefined, size: callback(1273).AvatarSizes.XSMALL };
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp3;
|
2026-07-23 10:11:24 +00:00
|
|
|
if (arg1 < outer1_1.length - 1) {
|
|
|
|
|
tmp3 = outer2_12;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
obj.cutout = tmp3;
|
2026-07-23 10:11:24 +00:00
|
|
|
obj.children = outer2_10(callback(1273).CutoutableAvatarImage, obj);
|
|
|
|
|
return outer2_10(gameRelationshipsByType, obj, id.id);
|
2026-07-20 16:05:17 +00:00
|
|
|
})
|
|
|
|
|
};
|
2026-07-23 10:11:24 +00:00
|
|
|
obj.children = outer1_10(gameRelationshipsByType, obj);
|
|
|
|
|
return outer1_10(gameRelationshipsByType, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items3);
|
|
|
|
|
obj = { accessibilityRole: "button" };
|
2026-07-23 10:11:24 +00:00
|
|
|
const intl = require(1212) /* getSystemLocale */.intl;
|
|
|
|
|
obj.accessibilityLabel = intl.string(require(1212) /* getSystemLocale */.t.TdEu5X);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.onPress = navigateToFriends;
|
|
|
|
|
const items4 = [style, tmp.pressable];
|
|
|
|
|
obj.style = items4;
|
|
|
|
|
obj.activeOpacity = 0.8;
|
2026-07-23 10:11:24 +00:00
|
|
|
obj = { accessibilityRole: "header", variant: "text-sm/semibold", color: "text-default", style: tmp.label };
|
|
|
|
|
const intl2 = require(1212) /* getSystemLocale */.intl;
|
|
|
|
|
obj.children = intl2.string(require(1212) /* getSystemLocale */.t.TdEu5X);
|
2026-07-25 08:10:48 +00:00
|
|
|
const items5 = [callback(require(4127) /* Text */.Text, obj), memo, callback(require(5512) /* ChevronSmallRightIcon */.ChevronSmallRightIcon, { size: "sm" })];
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.children = items5;
|
2026-07-25 08:10:48 +00:00
|
|
|
return callback2(require(4661) /* PressableBase */.PressableOpacity, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|