decord/source/modules/premium/powerups/hooks/useTotalPossibleBoostCount.tsx

59 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15548
// Function ID: 15549
2026-07-20 16:05:17 +00:00
// Name: useTotalPossibleBoostCount
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 4266, 676, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 15548 (useTotalPossibleBoostCount)
import set from "set" /* 2 */;
import noop from "noop" /* 19 */;
import BoostedGuildTiers from "BoostedGuildTiers" /* 4266 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
let useMemo = noop.useMemo;
2026-07-29 08:29:29 +00:00
({ MULTIPLE_PURCHASEABLE_PREMIUM_FEATURES_BOOST_INFO: closure_1, PURCHASABLE_PREMIUM_FEATURES_BOOST_INFO: obj1 } = BoostedGuildTiers);
({ AppliedGuildBoostsRequiredForBoostedGuildTier: c3, BoostedGuildTiers: c4, GuildFeatures: c5 } = ME);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/premium/powerups/hooks/useTotalPossibleBoostCount.tsx");
2026-07-20 16:05:17 +00:00
export default function useTotalPossibleBoostCount(arg0) {
2026-08-24 06:08:38 +00:00
useMemo = arg0;
2026-07-20 16:05:17 +00:00
const items = [arg0];
return useMemo(() => {
2026-07-23 10:11:24 +00:00
if (null == num) {
2026-07-20 16:05:17 +00:00
return 0;
} else {
let hasItem;
2026-07-29 08:29:29 +00:00
if (tmp != null) {
const features = tmp.features;
2026-08-24 06:08:38 +00:00
hasItem = features.has(closure_1_5.PREMIUM_TIER_3_OVERRIDE);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
num = 0;
2026-07-20 16:05:17 +00:00
if (true !== hasItem) {
2026-08-24 06:08:38 +00:00
num = closure_1_3[closure_1_4.TIER_3];
2026-07-20 16:05:17 +00:00
}
const _Object = Object;
2026-08-24 06:08:38 +00:00
const values = Object.values(closure_1_2);
2026-07-20 16:05:17 +00:00
const _Object2 = Object;
2026-08-24 06:08:38 +00:00
const combined = values.concat(Object.values(closure_1_1));
2026-07-20 16:05:17 +00:00
const item = combined.forEach((includedInLevel) => {
2026-07-29 08:29:29 +00:00
let tmp = null == includedInLevel.includedInLevel;
if (tmp) {
const isEnabled = includedInLevel.isEnabled;
2026-08-24 06:08:38 +00:00
num = undefined;
2026-07-29 08:29:29 +00:00
if (isEnabled != null) {
num = isEnabled(num.id);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 1;
}
tmp = num;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp) {
2026-07-23 10:11:24 +00:00
closure_0 = closure_0 + includedInLevel.boostPrice;
2026-07-20 16:05:17 +00:00
}
});
2026-07-23 10:11:24 +00:00
return num;
2026-07-20 16:05:17 +00:00
}
}, items);
};