decord/source/modules/game_server/hooks/useGameServerPowerupStatus.tsx

47 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12133
// Function ID: 12134
2026-07-20 16:05:17 +00:00
// Name: useGameServerPowerupStatus
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 4287, 589, 12117, 1236, 2369, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 12133 (useGameServerPowerupStatus)
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "handleGameServerInstanceCreated" /* 4287 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/game_server/hooks/useGameServerPowerupStatus.tsx");
2026-07-20 16:05:17 +00:00
export default function useGameServerPowerupStatus(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-08-24 06:08:38 +00:00
const items = [closure_4];
2026-07-20 16:05:17 +00:00
const items1 = [arg0];
2026-07-29 08:29:29 +00:00
const stateFromStores = _require(589).useStateFromStores(items, () => {
2026-08-24 06:08:38 +00:00
const stateForGuild = closure_1_4.getStateForGuild(closure_0);
2026-07-20 16:05:17 +00:00
let entitlements;
2026-07-29 08:29:29 +00:00
if (stateForGuild != null) {
2026-07-20 16:05:17 +00:00
entitlements = stateForGuild.entitlements;
}
return entitlements;
}, items1);
2026-08-25 06:04:03 +00:00
const tmp2 = stateFromStores(12117)(arg0);
2026-08-24 06:08:38 +00:00
dependencyMap = tmp2;
2026-07-20 16:05:17 +00:00
const items2 = [tmp2, stateFromStores];
return React.useMemo(() => {
2026-07-29 08:29:29 +00:00
let obj = stateFromStores;
if (stateFromStores == null) {
obj = {};
}
if (0 !== Object.values(obj).length) {
2026-08-24 06:08:38 +00:00
if (length.length > 0) {
2026-07-29 08:29:29 +00:00
obj = { type: "expiring", expiringAt: null };
obj[1] = tmp[0].ends_at;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { type: "active", statusText: null };
2026-08-24 06:08:38 +00:00
const intl = callback(length[4]).intl;
obj[1] = intl.string(stateFromStores(length[5]).FFLkmx);
2026-07-20 16:05:17 +00:00
}
return obj;
}
}, items2);
};