91 lines
3 KiB
TypeScript
91 lines
3 KiB
TypeScript
// Module ID: 7051
|
|
// Function ID: 7052
|
|
// Name: useGuildIdsToFetchSoundsFor
|
|
// Dependencies: [19, 2087, 5428, 558, 576, 573, 2]
|
|
// Exports: getGuildIdsToFetchSoundsFor
|
|
|
|
// Module 7051 (useGuildIdsToFetchSoundsFor)
|
|
import react from "react" /* 19 */;
|
|
import useStateFromStores from "useStateFromStores" /* 573 */;
|
|
import react2 from "react" /* 576 */;
|
|
import GuildStore from "GuildStore" /* 2087 */;
|
|
import SoundboardStore from "SoundboardStore" /* 5428 */;
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const useMemo = react.useMemo;
|
|
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useGuildIdsToFetchSoundsFor() {
|
|
let guildIds;
|
|
let sounds;
|
|
let tmp4;
|
|
let tmp5;
|
|
let tmp7;
|
|
let tmp8;
|
|
const obj = react2;
|
|
const cResult = obj.c(7);
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items = [GuildStore];
|
|
const fn = function s() {
|
|
return guildIds.getGuildIds();
|
|
};
|
|
cResult[0] = items;
|
|
cResult[1] = fn;
|
|
tmp4 = items;
|
|
tmp5 = fn;
|
|
} else {
|
|
[tmp4, tmp5] = cResult;
|
|
}
|
|
const tmpResult = useStateFromStores;
|
|
const stateFromStoresArray = tmpResult.useStateFromStoresArray(tmp4, tmp5);
|
|
if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const items1 = [SoundboardStore];
|
|
const fn2 = function c() {
|
|
return sounds.getSounds();
|
|
};
|
|
cResult[2] = items1;
|
|
cResult[3] = fn2;
|
|
tmp8 = fn2;
|
|
tmp7 = items1;
|
|
} else {
|
|
tmp7 = cResult[2];
|
|
tmp8 = cResult[3];
|
|
}
|
|
const tmpResult2 = useStateFromStores;
|
|
const stateFromStores = tmpResult2.useStateFromStores(tmp7, tmp8);
|
|
if (cResult[4] === stateFromStoresArray) {
|
|
let tmp11;
|
|
if (cResult[5] === stateFromStores) {
|
|
tmp11 = cResult[6];
|
|
}
|
|
return tmp11;
|
|
}
|
|
const found = stateFromStoresArray.filter((item) => null == closure_0.get(item));
|
|
cResult[4] = stateFromStoresArray;
|
|
cResult[5] = stateFromStores;
|
|
cResult[6] = found;
|
|
tmp11 = found;
|
|
}) : (function useGuildIdsToFetchSoundsFor() {
|
|
let guildIds;
|
|
let sounds;
|
|
let stateFromStores;
|
|
let stateFromStoresArray;
|
|
const items = [GuildStore];
|
|
const obj = stateFromStoresArray(stateFromStores[5]);
|
|
stateFromStoresArray = obj.useStateFromStoresArray(items, () => guildIds.getGuildIds());
|
|
const items1 = [SoundboardStore];
|
|
const obj2 = stateFromStoresArray(stateFromStores[5]);
|
|
stateFromStores = obj2.useStateFromStores(items1, () => sounds.getSounds());
|
|
const items2 = [stateFromStoresArray, stateFromStores];
|
|
return useMemo(() => {
|
|
let closure_0 = stateFromStores;
|
|
return stateFromStoresArray.filter((item) => null == closure_0.get(item));
|
|
}, items2);
|
|
});
|
|
const result = size.fileFinishedImporting("modules/soundboard/useGuildIdsToFetchSoundsFor.tsx");
|
|
|
|
export const useGuildIdsToFetchSoundsFor = tmp2;
|
|
export const getGuildIdsToFetchSoundsFor = function getGuildIdsToFetchSoundsFor() {
|
|
const guildIds = GuildStore.getGuildIds();
|
|
const sounds = SoundboardStore.getSounds();
|
|
return guildIds.filter((item) => null == closure_0.get(item));
|
|
};
|