decord/source/stores/billing/GuildBoostSlotStore.tsx

85 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4271
// Function ID: 4272
2026-07-29 08:29:29 +00:00
// Name: handleGuildBoostsUpdate
2026-08-24 06:08:38 +00:00
// Dependencies: [4048, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 4271 (handleGuildBoostsUpdate)
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_0 from "reset" /* 4048 */;
2026-07-20 16:05:17 +00:00
function handleGuildBoostsUpdate(guildBoostSlot) {
guildBoostSlot = guildBoostSlot.guildBoostSlot;
const obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(obj);
2026-07-20 16:05:17 +00:00
obj[guildBoostSlot.id] = guildBoostSlot;
}
function handleSubscriptionStoreUpdate() {
const obj = {};
2026-07-23 10:11:24 +00:00
const values = Object.values(obj);
2026-07-29 08:29:29 +00:00
for (const item10010 of values) {
obj[item10010.id] = item10010;
let tmp2 = subscriptionById;
item10010.subscription = subscriptionById.getSubscriptionById(item10010.subscriptionId);
continue;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let c1 = false;
let c2 = false;
let closure_3 = {};
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class GuildBoostSlotStore extends Store {
}
const prototype = GuildBoostSlotStore.prototype;
prototype["initialize"] = function initialize() {
2026-08-24 06:08:38 +00:00
const items = [closure_0];
2026-07-29 08:29:29 +00:00
this.syncWith(items, handleSubscriptionStoreUpdate);
};
Object.defineProperty(prototype, "hasFetched", {
get: function hasFetched() {
return c1;
},
set: undefined
});
Object.defineProperty(prototype, "isFetching", {
get: function isFetching() {
return c2;
},
set: undefined
});
Object.defineProperty(prototype, "boostSlots", {
get: function boostSlots() {
return closure_3;
},
set: undefined
});
prototype["getGuildBoostSlot"] = function getGuildBoostSlot(arg0) {
return table[arg0];
};
GuildBoostSlotStore.displayName = "GuildBoostSlotStore";
2026-08-24 06:08:38 +00:00
const guildBoostSlotStore = new GuildBoostSlotStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
GUILD_BOOST_SLOTS_FETCH: function handleGuildBoostsFetch() {
2026-08-24 06:08:38 +00:00
c2 = true;
2026-07-20 16:05:17 +00:00
},
GUILD_BOOST_SLOTS_FETCH_SUCCESS: function handleGuildBoostsFetchSuccess(guildBoostSlots) {
guildBoostSlots = guildBoostSlots.guildBoostSlots;
2026-08-24 06:08:38 +00:00
closure_3 = {};
2026-07-20 16:05:17 +00:00
const item = guildBoostSlots.forEach((id) => {
2026-07-29 08:29:29 +00:00
closure_3[id.id] = id;
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
c2 = false;
c1 = true;
2026-07-20 16:05:17 +00:00
},
GUILD_BOOST_SLOT_UPDATE_SUCCESS: handleGuildBoostsUpdate,
GUILD_BOOST_SLOT_CREATE: handleGuildBoostsUpdate,
GUILD_BOOST_SLOT_UPDATE: handleGuildBoostsUpdate,
LOGOUT: function handleLogout() {
2026-08-24 06:08:38 +00:00
closure_3 = {};
c1 = false;
c2 = false;
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("stores/billing/GuildBoostSlotStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default guildBoostSlotStore;