decord/source/modules/guild_onboarding_home/getNextResourceChannel.tsx
2026-07-22 07:54:56 +00:00

39 lines
2.7 KiB
TypeScript

// Module ID: 11372
// Function ID: 88416
// Name: getCurrentAndNextResourceChannel
// Dependencies: []
// Exports: default, usePreviousAndNextResourceChannel
// Module 11372 (getCurrentAndNextResourceChannel)
let closure_2 = importDefault(dependencyMap[0]);
const result = arg1(dependencyMap[2]).fileFinishedImporting("modules/guild_onboarding_home/getNextResourceChannel.tsx");
export default function getCurrentAndNextResourceChannel(arg0, arg1) {
const resourceChannels = resourceChannels.getResourceChannels(arg0);
const findIndexResult = resourceChannels.findIndex((channelId) => channelId.channelId === arg1);
if (findIndexResult < 0) {
let items = [0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000313243198316887, -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023201793093501323];
} else {
items = [resourceChannels[findIndexResult], resourceChannels[(findIndexResult + 1) % resourceChannels.length]];
}
return items;
};
export const usePreviousAndNextResourceChannel = function usePreviousAndNextResourceChannel(guild_id, id) {
id = guild_id;
const dependencyMap = id;
const items = [closure_2];
const stateFromStores = id(dependencyMap[1]).useStateFromStores(items, () => resourceChannels.getResourceChannels(arg0));
const findIndexResult = stateFromStores.findIndex((channelId) => channelId.channelId === arg1);
if (findIndexResult >= 0) {
if (stateFromStores.length > 1) {
if (2 === stateFromStores.length) {
const items1 = [true, stateFromStores[1 - findIndexResult]];
let items2 = items1;
} else {
items2 = [stateFromStores[(findIndexResult - 1) % stateFromStores.length], stateFromStores[(findIndexResult + 1) % stateFromStores.length]];
}
}
return items2;
}
items2 = [0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000313243198316887, -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023201793093501323];
};