48 lines
3.3 KiB
TypeScript
48 lines
3.3 KiB
TypeScript
/* Metro module 8265; source: modules/premium/powerups/hooks/useGuildPowerupsBoostLevelProgress.tsx; dependencies: [1867, 661, 8254, 566, 2] */
|
|
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UseGuildPowerupsBoostCount from './useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun66101(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:6, offset: 0x01bec077, size: 173 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/useGuildPowerupsBoostLevelProgress.tsx');
|
|
exports.default = useGuildPowerupBoostLevelProgress;
|
|
exports.getGuildPowerupBoostLevelProgress = function(a0) {
|
|
var r2;
|
|
var value2 = undefined;
|
|
var value3 = require(dependencyMap[2]).getGuildPowerupsBoostCount(a0);
|
|
var value4 = GuildStore.getGuild(a0);
|
|
r2 = value4 == null ? value2 : value4.premiumTier;
|
|
r2 = r2 ?? BoostedGuildTiers.NONE;
|
|
return AppliedGuildBoostsRequiredForBoostedGuildTier[r2] + value3.available;
|
|
};
|
|
function useGuildPowerupBoostLevelProgress(a0) { // fn#66102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:319, offset: 0x01bec124, size: 145 bytes, params: 2, frame: 21
|
|
const env0_0 = a0;
|
|
const value2 = (UseGuildPowerupsBoostCount)(a0);
|
|
let useStateFromStores = FluxModule.useStateFromStores;
|
|
const guildStoreBinding = GuildStore;
|
|
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[guildStoreBinding], _fun66103]);
|
|
useStateFromStores = FluxModule.useStateFromStores;
|
|
return (Reflect.apply(useStateFromStores, FluxModule, [[guildStoreBinding],
|
|
_fun66104]) ? 0 : AppliedGuildBoostsRequiredForBoostedGuildTier[value3]) + value2.available;
|
|
function _fun66103() { // fn#66103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:416, offset: 0x01bec1b5, size: 58 bytes, params: 1, frame: 13
|
|
return GuildStore.getGuild(env0_0)?.premiumTier ?? BoostedGuildTiers.NONE;
|
|
}
|
|
|
|
function _fun66104() { // fn#66104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8450:542, offset: 0x01bec1ef, size: 70 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
const guild = GuildStore.getGuild(env0_0);
|
|
return (guild == null ? undefined : guild.features.has(GuildFeatures.PREMIUM_TIER_3_OVERRIDE)) === true;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun66101, 8265, [1867, 661, 8254, 566,
|
|
2]) /* metro module 8265, dependencies: [1867, 661, 8254, 566, 2] */;
|