55 lines
3.5 KiB
TypeScript
55 lines
3.5 KiB
TypeScript
/* Metro module 14624; source: modules/premium/powerups/hooks/useGuildPowerupExpiringNotificationsConfig.tsx; dependencies: [14625, 14626, 1244, 2646, 8188, 2256, 2] */
|
|
import UseGetExpiringGuildPowerups from './useGetExpiringGuildPowerups.tsx'; /* Metro dependency 14625 */
|
|
import UseGameServerGetExpiringEntitlements from '../../game_server/hooks/useGameServerGetExpiringEntitlements.tsx'; /* Metro dependency 14626 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as PowerupsModule from '../../../../external/discord_common/js/shared/shared-constants/Powerups.tsx'; /* Metro dependency 8188 */
|
|
|
|
function _fun110554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14821:6, offset: 0x0237d160, size: 103 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/hooks/useGuildPowerupExpiringNotificationsConfig.tsx');
|
|
exports.default = useGuildPowerupExpiringNotificationsConfig;
|
|
function useGuildPowerupExpiringNotificationsConfig(a0) { // fn#110555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14821:213, offset: 0x0237d1c7, size: 446 bytes, params: 2, frame: 24
|
|
var r11;
|
|
var items2;
|
|
const intl = (IndexNativeModule).intl;
|
|
var value8;
|
|
var items3;
|
|
const value2 = undefined;
|
|
const value3 = (UseGetExpiringGuildPowerups)(a0);
|
|
const value4 = (UseGameServerGetExpiringEntitlements)(a0);
|
|
let length = value3.length;
|
|
const r4 = length > 0 || value4.length > 0;
|
|
if (r4) {
|
|
length = value4.length;
|
|
r11 = length > 0 ? intl.string((importDefault(2646) /* metro dependency 2646: GameServerMessages */)['B3OfL/']) : value2;
|
|
value8 = value3.map(function(a0) {
|
|
return a0.title;
|
|
});
|
|
items2 = [];
|
|
arraySpread(items2, r11 != null ? [r11] : [], arraySpread(items2, value8, 0, undefined), undefined);
|
|
items3 = [];
|
|
if (value3.some(_fun110557)) {
|
|
items3.push(intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).Sfr0Jw));
|
|
}
|
|
length = value4.length;
|
|
if (length > 0) {
|
|
items3.push(intl.string((importDefault(2646) /* metro dependency 2646: GameServerMessages */).wiungr));
|
|
}
|
|
return {shouldShow: r4, expiringPowerups: value3, expiringPowerupNames: items2, warnings: items3};
|
|
}
|
|
return {shouldShow: false, expiringPowerups: [], expiringPowerupNames: [], warnings: []};
|
|
function _fun110557({skuId}) { // fn#110557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14821:535, offset: 0x0237d385, size: 45 bytes, params: 2, frame: 12
|
|
const VANITY_URL_POWERUP_SKU_ID = (PowerupsModule).VANITY_URL_POWERUP_SKU_ID;
|
|
return skuId === VANITY_URL_POWERUP_SKU_ID;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110554, 14624, [14625, 14626, 1244, 2646, 8188, 2256,
|
|
2]) /* metro module 14624, dependencies: [14625, 14626, 1244, 2646, 8188, 2256, 2] */;
|