decord/alpha/source/modules/people/hooks/useFriendRequestCounts.tsx

82 lines
2.6 KiB
TypeScript
Raw Permalink Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 17516
// Function ID: 17517
// Name: useFriendRequestCounts
2026-10-12 06:59:38 +00:00
// Dependencies: [32, 7347, 4760, 558, 576, 504, 2]
2026-10-03 08:58:59 +00:00
// Exports: getIncomingFriendRequestCount, getOutgoingFriendRequestCount
2026-07-20 16:05:17 +00:00
2026-10-13 12:43:34 +00:00
// Module 17516 (useFriendRequestCounts)
2026-10-03 08:58:59 +00:00
import react from "react" /* 576 */;
import _slicedToArray from "_slicedToArray" /* 32 */;
2026-10-12 06:59:38 +00:00
import GameRelationshipStore from "GameRelationshipStore" /* 7347 */;
2026-10-10 08:08:14 +00:00
import RelationshipStore from "RelationshipStore" /* 4760 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let tmp;
const get_initialized = tmp(504);
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIncomingFriendRequestCount() {
2026-10-03 08:58:59 +00:00
let tmp4;
let tmp5;
const obj = react;
const cResult = obj.c(2);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
let items = [RelationshipStore, GameRelationshipStore];
2026-10-08 09:57:35 +00:00
const fn = function o() {
2026-10-03 08:58:59 +00:00
let obj;
let obj2;
const items = [RelationshipStore, GameRelationshipStore];
[obj, obj2] = items;
_slicedToArray(items, 2);
const pendingCount = obj.getPendingCount();
return pendingCount + obj2.getPendingIncomingCount();
};
cResult[0] = items;
cResult[1] = fn;
tmp4 = items;
tmp5 = fn;
} else {
[tmp4, tmp5] = cResult;
}
const tmpResult = get_initialized;
return tmpResult.useStateFromStores(tmp4, tmp5);
2026-10-08 09:57:35 +00:00
}) : (function useIncomingFriendRequestCount() {
2026-10-03 08:58:59 +00:00
const obj = get_initialized;
let items = [RelationshipStore, GameRelationshipStore];
2026-10-03 08:58:59 +00:00
return obj.useStateFromStores(items, () => {
let obj;
let obj2;
const items = [RelationshipStore, GameRelationshipStore];
[obj, obj2] = items;
2026-10-03 08:58:59 +00:00
_slicedToArray(items, 2);
2026-07-29 08:29:29 +00:00
const pendingCount = obj.getPendingCount();
return pendingCount + obj2.getPendingIncomingCount();
2026-07-20 16:05:17 +00:00
});
2026-10-03 08:58:59 +00:00
});
let closure_5 = tmp2;
function getIncomingFriendRequestCount(items) {
let obj;
let obj2;
[obj, obj2] = items;
_slicedToArray(items, 2);
const pendingCount = obj.getPendingCount();
return pendingCount + obj2.getPendingIncomingCount();
}
const result = size.fileFinishedImporting("modules/people/hooks/useFriendRequestCounts.tsx");
export { getIncomingFriendRequestCount };
export const useIncomingFriendRequestCount = tmp2;
2026-07-20 16:05:17 +00:00
export const getOutgoingFriendRequestCount = function getOutgoingFriendRequestCount(items1) {
2026-10-03 08:58:59 +00:00
let obj;
let obj2;
2026-07-20 16:05:17 +00:00
let tmp = items1;
if (items1 === undefined) {
2026-10-03 08:58:59 +00:00
const items = [closure_5, ];
2026-07-20 16:05:17 +00:00
items[1] = globalThis.s;
tmp = items;
}
[obj, obj2] = tmp;
2026-10-03 08:58:59 +00:00
_slicedToArray(tmp, 2);
2026-07-29 08:29:29 +00:00
const outgoingCount = obj.getOutgoingCount();
return outgoingCount + obj2.getPendingOutgoingCount();
2026-07-20 16:05:17 +00:00
};