decord/source/modules/game_claim/UnclaimedGamesStore.tsx

68 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 16288
// Function ID: 16289
// Name: UnclaimedGamesStore
// Dependencies: [504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 16288 (UnclaimedGamesStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
2026-07-20 16:05:17 +00:00
let guildIdToGameIds = null;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class UnclaimedGamesStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = UnclaimedGamesStore.prototype;
prototype["getMap"] = function getMap() {
return guildIdToGameIds;
2026-07-29 08:29:29 +00:00
};
prototype["getUnclaimedGameIdsForGuild"] = function getUnclaimedGameIdsForGuild(arg0) {
let items;
if (guildIdToGameIds != null) {
2026-07-29 08:29:29 +00:00
items = tmp[arg0];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (items == null) {
items = [];
}
return items;
};
prototype["hasUnclaimedGames"] = function hasUnclaimedGames(arg0) {
let tmp2;
if (guildIdToGameIds != null) {
2026-07-29 08:29:29 +00:00
tmp2 = tmp[arg0];
}
let tmp4 = null != tmp2;
if (tmp4) {
tmp4 = tmp2.length > 0;
}
return tmp4;
};
prototype["getGuildIdsWithUnclaimedGames"] = function getGuildIdsWithUnclaimedGames() {
if (null == guildIdToGameIds) {
2026-07-29 08:29:29 +00:00
return [];
} else {
closure_0 = guildIdToGameIds;
2026-07-29 08:29:29 +00:00
const _Object = Object;
const keys = Object.keys(guildIdToGameIds);
return keys.filter((item) => {
let items = closure_0[item];
2026-07-29 08:29:29 +00:00
if (items == null) {
2026-07-20 16:05:17 +00:00
items = [];
}
2026-07-29 08:29:29 +00:00
return items.length > 0;
});
}
};
UnclaimedGamesStore.displayName = "UnclaimedGamesStore";
const unclaimedGamesStore = new UnclaimedGamesStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
LOGOUT: function handleLogout() {
guildIdToGameIds = null;
2026-07-20 16:05:17 +00:00
},
UNCLAIMED_GAMES_FETCH_SUCCESS: function handleFetchSuccess(guildIdToGameIds) {
guildIdToGameIds = guildIdToGameIds.guildIdToGameIds;
}
});
const size = fn(2);
const result = size.fileFinishedImporting("modules/game_claim/UnclaimedGamesStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default unclaimedGamesStore;