/* Metro module 14628; source: modules/premium/powerups/hooks/useGuildPowerupsWarningConfig.tsx; dependencies: [31, 12346, 8254, 566, 1244, 2256, 2] */ import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */ import AppliedGuildBoostStore from '../../../../stores/AppliedGuildBoostStore.tsx'; /* Metro dependency 12346 */ import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */ function _fun110570(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:6, offset: 0x0237da44, size: 137 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupsWarningConfig.tsx'); exports.default = useGuildPowerupsWarningConfig; function useGuildPowerupsWarningConfig(a0, a1) { // fn#110571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:224, offset: 0x0237dacd, size: 181 bytes, params: 3, frame: 19 const env0_0 = a0; const env0_1 = a1; const spent = (UseGuildPowerupsBoostCount)(a0).spent; const value2 = (FluxModule).useStateFromStores([AppliedGuildBoostStore], _fun110572, [a0]); const useMemo = ReactModule.useMemo; return ReactModule.useMemo(_fun110575, [spent - Reflect.apply(useMemo, ReactModule, [_fun110573, [value2]]), a1]); function _fun110572() { // fn#110572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:325, offset: 0x0237db82, size: 27 bytes, params: 1, frame: 11 return AppliedGuildBoostStore.getAppliedGuildBoostsForGuild(env0_0); } function _fun110573() { // fn#110573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:385, offset: 0x0237db9d, size: 87 bytes, params: 1, frame: 14 var length; var value; const value2 = undefined; if (env0_2 == null) { length = value2; } else if (env0_2.filter == null) { length = value2; } else { value = env0_2.filter(function(a0) { return !a0.ended && a0.endsAt == null; }); length = value == null ? value2 : value.length; } return length ?? 0; } function _fun110575() { // fn#110575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14825:535, offset: 0x0237dc11, size: 200 bytes, params: 1, frame: 20 var r0; var object; var value2; const intl = (IndexNativeModule).intl; var formatToPlainString; var iAaAiG; var object2; var binding; if (ReactModule <= 0) { r0 = {'shouldShow': false, 'title': '', 'description': '', 'requiredBoostCount': 0}; } else { object = {shouldShow: true}; value2 = environment.__proto__; object.title = intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).n5hQhc); formatToPlainString = intl.formatToPlainString; iAaAiG = (importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).iAaAiG; object2 = {}; binding = ReactModule; object2.boostCount = binding; object2.perksString = require.join(', '); object.description = Reflect.apply(formatToPlainString, intl, [iAaAiG, object2]); object.requiredBoostCount = binding; r0 = object; } return r0; } } } global.__d(_fun110570, 14628, [31, 12346, 8254, 566, 1244, 2256, 2]) /* metro module 14628, dependencies: [31, 12346, 8254, 566, 1244, 2256, 2] */;