decord/source/stores/billing/GuildBoostSlotStore.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

86 lines
2.5 KiB
TypeScript

// Module ID: 4532
// Function ID: 4533
// Name: GuildBoostSlotStore
// Dependencies: [4301, 504, 573, 2]
// Module 4532 (GuildBoostSlotStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import SubscriptionStore from "SubscriptionStore" /* 4301 */;
function handleGuildBoostsUpdate(guildBoostSlot) {
guildBoostSlot = guildBoostSlot.guildBoostSlot;
const obj = {};
const merged = Object.assign(closure_3);
obj[guildBoostSlot.id] = guildBoostSlot;
closure_3 = obj;
}
function handleSubscriptionStoreUpdate() {
const obj = {};
const values = Object.values(closure_3);
for (const item10010 of values) {
obj[item10010.id] = item10010;
item10010.subscription = SubscriptionStore.getSubscriptionById(item10010.subscriptionId);
continue;
}
closure_3 = obj;
}
let c1 = false;
let c2 = false;
let closure_3 = {};
const Store = initializeDefault.Store;
class GuildBoostSlotStore extends Store {
}
const prototype = GuildBoostSlotStore.prototype;
prototype["initialize"] = function initialize() {
const items = [SubscriptionStore];
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 closure_3[arg0];
};
GuildBoostSlotStore.displayName = "GuildBoostSlotStore";
const guildBoostSlotStore = new GuildBoostSlotStore(DispatcherDefault, {
GUILD_BOOST_SLOTS_FETCH: function handleGuildBoostsFetch() {
c2 = true;
},
GUILD_BOOST_SLOTS_FETCH_SUCCESS: function handleGuildBoostsFetchSuccess(guildBoostSlots) {
guildBoostSlots = guildBoostSlots.guildBoostSlots;
closure_3 = {};
const item = guildBoostSlots.forEach((id) => {
closure_1_3[id.id] = id;
});
c2 = false;
c1 = true;
},
GUILD_BOOST_SLOT_UPDATE_SUCCESS: handleGuildBoostsUpdate,
GUILD_BOOST_SLOT_CREATE: handleGuildBoostsUpdate,
GUILD_BOOST_SLOT_UPDATE: handleGuildBoostsUpdate,
LOGOUT: function handleLogout() {
closure_3 = {};
c1 = false;
c2 = false;
}
});
const size = fn(2);
const result = size.fileFinishedImporting("stores/billing/GuildBoostSlotStore.tsx");
export default guildBoostSlotStore;