/* Metro module 12577; source: modules/rewards/hooks/useHasXboxMonthlyOrbsPerk.tsx; dependencies: [1878, 1880, 3802, 1893, 1895, 566, 2] */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */ function _fun96339(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12767:6, offset: 0x0215b2ae, size: 159 bytes, params: 8, frame: 20 const env0_0 = require; const hasCrepeMonthlyOrbsPerk2 = hasCrepeMonthlyOrbsPerk; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/rewards/hooks/useHasXboxMonthlyOrbsPerk.tsx'); exports.hasCrepeMonthlyOrbsPerk = hasCrepeMonthlyOrbsPerk2; exports.useHasXboxMonthlyOrbsPerk = function() { return hasCrepeMonthlyOrbsPerk(require(dependencyMap[5]).useStateFromStores([UserStore], _fun96342)); }; function hasCrepeMonthlyOrbsPerk(a0) { // fn#96340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12767:129, offset: 0x0215b34d, size: 223 bytes, params: 2, frame: 18 var moduleValue; var moduleValue2; var value3; const value2 = undefined; const defaultImport = PremiumUtils; if (defaultImport.canUseMonthlyOrbs(a0)) { moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */; if (moduleValue.isPremiumExactly(a0, PremiumTypes.TIER_2)) { return false; } moduleValue2 = require(1893) /* metro dependency 1893: PerksStateUtils */; value3 = moduleValue2.getPerkSource(a0 == null ? value2 : a0.perks, (require(1895) /* metro dependency 1895: user */).Perk.MONTHLY_ORBS); return value3 != null && value3.includes((require(1895) /* metro dependency 1895: user */).PerkSource.SOURCE_THIRDPARTY_CROISSANT); } return false; } function useHasXboxMonthlyOrbsPerk() { // fn#96341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12767:561, offset: 0x0215b42c, size: 68 bytes, params: 1, frame: 15 const hasCrepeMonthlyOrbsPerkBinding = hasCrepeMonthlyOrbsPerk; const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getCurrentUser(); }); return hasCrepeMonthlyOrbsPerkBinding(currentUser); function _fun96342() { // fn#96342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12767:661, offset: 0x01714bfc, size: 18 bytes, params: 1, frame: 9 return UserStore.getCurrentUser(); } } } global.__d(_fun96339, 12577, [1878, 1880, 3802, 1893, 1895, 566, 2]) /* metro module 12577, dependencies: [1878, 1880, 3802, 1893, 1895, 566, 2] */;