decord/source/modules/rewards/hooks/useHasXboxMonthlyOrbsPerk.tsx

37 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 12718
// Function ID: 98947
2026-07-20 16:05:17 +00:00
// Name: hasCrepeMonthlyOrbsPerk
2026-07-25 08:10:48 +00:00
// Dependencies: [1850, 1852, 3777, 1866, 1868, 566, 2]
2026-07-20 16:05:17 +00:00
// Exports: useHasXboxMonthlyOrbsPerk
2026-07-27 11:26:19 +00:00
// Module 12718 (hasCrepeMonthlyOrbsPerk)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { PremiumTypes } from "GuildFeatures";
const require = arg1;
2026-07-20 16:05:17 +00:00
function hasCrepeMonthlyOrbsPerk(currentUser) {
if (obj.canUseMonthlyOrbs(currentUser)) {
if (!obj2.isPremiumExactly(currentUser, PremiumTypes.TIER_2)) {
let perks;
if (null != currentUser) {
perks = currentUser.perks;
}
2026-07-25 08:10:48 +00:00
const perkSource = require(1866) /* parseServerPerkConfigKind */.getPerkSource(perks, require(1868) /* _callSuper */.Perk.MONTHLY_ORBS);
2026-07-20 16:05:17 +00:00
let hasItem = null != perkSource;
if (hasItem) {
2026-07-25 08:10:48 +00:00
hasItem = perkSource.includes(require(1868) /* _callSuper */.PerkSource.SOURCE_THIRDPARTY_CROISSANT);
2026-07-20 16:05:17 +00:00
}
return hasItem;
}
2026-07-25 08:10:48 +00:00
obj2 = require(3777) /* _createForOfIteratorHelperLoose */;
2026-07-20 16:05:17 +00:00
}
return false;
}
2026-07-23 10:11:24 +00:00
const result = require("_createForOfIteratorHelperLoose").fileFinishedImporting("modules/rewards/hooks/useHasXboxMonthlyOrbsPerk.tsx");
2026-07-20 16:05:17 +00:00
export { hasCrepeMonthlyOrbsPerk };
export const useHasXboxMonthlyOrbsPerk = function useHasXboxMonthlyOrbsPerk() {
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct];
return hasCrepeMonthlyOrbsPerk(require(566) /* initialize */.useStateFromStores(items, () => outer1_3.getCurrentUser()));
2026-07-20 16:05:17 +00:00
};