decord/source/modules/game_profile/hooks/useOpenGameProfileModal.tsx

46 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 9161
// Function ID: 9162
2026-07-20 16:05:17 +00:00
// Name: useOpenGameProfileModal
2026-08-05 07:35:12 +00:00
// Dependencies: [9162, 9166, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 9161 (useOpenGameProfileModal)
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/game_profile/hooks/useOpenGameProfileModal.tsx");
2026-07-20 16:05:17 +00:00
export default function useOpenGameProfileModal(arg0) {
const importDefault = arg0;
2026-07-29 08:29:29 +00:00
let obj = arg1;
2026-07-20 16:05:17 +00:00
if (arg1 === undefined) {
obj = {};
}
2026-07-23 10:11:24 +00:00
const onOpened = obj.onOpened;
let c2;
2026-07-20 16:05:17 +00:00
let gameId;
2026-07-23 10:11:24 +00:00
const tmp = importDefault(onOpened[0])(arg0);
c2 = tmp;
2026-07-20 16:05:17 +00:00
gameId = tmp.gameId;
let fn;
if (tmp.shouldOpenGameProfile) {
if (null != gameId) {
fn = (stopPropagation) => {
2026-07-29 08:29:29 +00:00
if (stopPropagation != null) {
2026-07-20 16:05:17 +00:00
stopPropagation.stopPropagation();
}
2026-07-29 08:29:29 +00:00
if (stopPropagation != null) {
2026-07-20 16:05:17 +00:00
stopPropagation.preventDefault();
}
2026-07-23 10:11:24 +00:00
let obj = callback(onOpened[1]);
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(callback);
2026-07-29 08:29:29 +00:00
obj.gameId = gameId;
obj.gameProfileModalChecks = c2;
2026-07-20 16:05:17 +00:00
obj.openGameProfileModal(obj);
2026-07-29 08:29:29 +00:00
if (onOpened != null) {
2026-07-20 16:05:17 +00:00
onOpened();
}
};
}
}
return fn;
};