2026-09-10 05:38:07 +00:00
|
|
|
// Module ID: 13096
|
|
|
|
|
// Function ID: 13097
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useUserProfileGameFriendApplicationIds
|
2026-09-10 05:38:07 +00:00
|
|
|
// Dependencies: [19, 4222, 1371, 504, 13093, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: useUserProfileGameFriendApplicationIds
|
|
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
// Module 13096 (useUserProfileGameFriendApplicationIds)
|
|
|
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
|
import RelationshipStore from "RelationshipStore" /* 4222 */;
|
|
|
|
|
import UserStore from "UserStore" /* 1371 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const require = fn;
|
2026-07-20 16:05:17 +00:00
|
|
|
let closure_5 = [];
|
2026-09-10 05:38:07 +00:00
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/game_relationships/hooks/useUserProfileGameFriendApplicationIds.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const useUserProfileGameFriendApplicationIds = function useUserProfileGameFriendApplicationIds(userId) {
|
|
|
|
|
userId = userId.userId;
|
2026-07-29 08:29:29 +00:00
|
|
|
let stateFromStores;
|
2026-09-10 05:38:07 +00:00
|
|
|
const items = [RelationshipStore, UserStore];
|
2026-07-23 10:11:24 +00:00
|
|
|
stateFromStores = userId(stateFromStores[3]).useStateFromStores(items, () => {
|
2026-09-10 05:38:07 +00:00
|
|
|
let isFriendResult = RelationshipStore.isFriend(userId);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (!isFriendResult) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const user = UserStore.getUser(userId);
|
2026-07-20 16:05:17 +00:00
|
|
|
let isProvisional;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (user != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
isProvisional = user.isProvisional;
|
|
|
|
|
}
|
|
|
|
|
isFriendResult = isProvisional;
|
|
|
|
|
}
|
|
|
|
|
return isFriendResult;
|
|
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = userId(stateFromStores[3]);
|
2026-09-10 05:38:07 +00:00
|
|
|
const gameFriendsForUser = userId(stateFromStores[4]).useGameFriendsForUser(userId);
|
2026-07-20 16:05:17 +00:00
|
|
|
const items1 = [gameFriendsForUser, stateFromStores];
|
2026-07-23 10:11:24 +00:00
|
|
|
return gameFriendsForUser.useMemo(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (stateFromStores) {
|
2026-09-10 05:38:07 +00:00
|
|
|
let mapped = closure_5;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
mapped = gameFriendsForUser.map((applicationId) => applicationId.applicationId);
|
|
|
|
|
}
|
|
|
|
|
return mapped;
|
|
|
|
|
}, items1);
|
|
|
|
|
};
|