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

47 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 11744
// Function ID: 11745
2026-07-20 16:05:17 +00:00
// Name: useGameServerPowerupStatus
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 4282, 589, 11728, 1236, 2367, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 11744 (useGameServerPowerupStatus)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import handleGameServerInstanceCreated from "handleGameServerInstanceCreated";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-30 10:14:41 +00:00
const result = require("initialize").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-07-29 08:29:29 +00:00
const items = [handleGameServerInstanceCreated];
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-07-23 10:11:24 +00:00
const stateForGuild = outer1_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-15 05:55:55 +00:00
const tmp2 = stateFromStores(11728)(arg0);
2026-07-20 16:05:17 +00:00
const dependencyMap = tmp2;
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-07-20 16:05:17 +00:00
if (tmp2.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-07-23 10:11:24 +00:00
const intl = callback(tmp2[4]).intl;
2026-07-29 08:29:29 +00:00
obj[1] = intl.string(stateFromStores(callback[5]).FFLkmx);
2026-07-20 16:05:17 +00:00
}
return obj;
}
}, items2);
};