93 lines
5.5 KiB
TypeScript
93 lines
5.5 KiB
TypeScript
/* Metro module 14629; source: modules/premium/powerups/native/GuildPowerupsLevelsSection.tsx; dependencies: [31, 27, 33, 697, 478, 4501, 14630, 1244, 2256, 12333, 14631, 2] */
|
|
import GuildPowerupsMessages from '../GuildPowerups.messages.js'; /* Metro dependency 2256 */
|
|
import GuildPowerupsSectionHeader from './GuildPowerupsSectionHeader.tsx'; /* Metro dependency 14630 */
|
|
import GuildPowerupsLevelCard from './GuildPowerupsLevelCard.tsx'; /* Metro dependency 14631 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as MarketingCardsScrollerModule from '../../../guild_boosting/native/marketing_redesign/MarketingCardsScroller.tsx'; /* Metro dependency 12333 */
|
|
|
|
function _fun110576(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14826:6, offset: 0x0237dcd9, size: 363 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.Fragment;
|
|
const env0_7 = value.jsxs;
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
value = require(478) /* metro dependency 478: PlatformUtils */;
|
|
value = value.isIOS();
|
|
const r11 = value ? 300 : 325;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.cardContainer = {'width': 250, 'marginEnd': null, 'flex': 1, marginEnd: PX_16};
|
|
const object3 = {height: r11};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object3.paddingBottom = PX_8;
|
|
object.scroller = object3;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.scrollerContent = {paddingHorizontal: PX_16};
|
|
const env0_9 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/native/GuildPowerupsLevelsSection.tsx');
|
|
exports.default = GuildPowerupsLevelsSection;
|
|
function GuildPowerupsLevelsSection({guildId, listings}) { // fn#110577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14826:496, offset: 0x0237de44, size: 379 bytes, params: 2, frame: 29
|
|
const styles = useStyles();
|
|
const value2 = ReactModule.useMemo(_fun110578, [listings]);
|
|
const env0_4 = ReactModule.useRef(false);
|
|
const value3 = ReactModule.useCallback(_fun110581, []);
|
|
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
|
const intl = (IndexNativeModule).intl;
|
|
const guildPowerupsSectionHeader = (
|
|
<GuildPowerupsSectionHeader
|
|
title={intl.string((GuildPowerupsMessages)['TXY/b0'])}
|
|
description={intl.string((GuildPowerupsMessages).aJv4PB)}
|
|
/>
|
|
);
|
|
const MarketingCardsScroller = (MarketingCardsScrollerModule).MarketingCardsScroller;
|
|
return (
|
|
<>
|
|
{guildPowerupsSectionHeader}
|
|
<MarketingCardsScroller
|
|
cardMarginRight={PX_16}
|
|
cardWidth={250}
|
|
contentContainerStyle={styles.scrollerContent}
|
|
itemCount={value2.length}
|
|
onScrollingChange={value3}
|
|
style={styles.scroller}
|
|
>
|
|
{value2.map(_fun110582)}
|
|
</MarketingCardsScroller>
|
|
</>
|
|
);
|
|
function _fun110578() { // fn#110578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14826:579, offset: 0x0237dfbf, size: 45 bytes, params: 1, frame: 12
|
|
return listings.filter(function(a0) {
|
|
return a0.type === 'singleLevel';
|
|
}).map(function(a0) {
|
|
return a0.powerup;
|
|
});
|
|
}
|
|
|
|
function _fun110581(a0) { // fn#110581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14826:679, offset: 0x01e9a99b, size: 20 bytes, params: 2, frame: 2
|
|
env0_4.current = a0;
|
|
}
|
|
|
|
function _fun110582(a0, a1) { // fn#110582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14826:1007, offset: 0x0237e00b, size: 130 bytes, params: 3, frame: 21
|
|
const value = environment.__proto__;
|
|
return (
|
|
<View style={styles.cardContainer} key={a0.skuId}>
|
|
{((Component) => <Component guildId={guildId} powerup={a0} nextPowerup={ReactModule[a1 + 1]} index={a1} isScrollingRef={env0_4} />)(GuildPowerupsLevelCard)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110576, 14629, [31, 27, 33, 697, 478, 4501, 14630, 1244, 2256, 12333, 14631,
|
|
2]) /* metro module 14629, dependencies: [31, 27, 33, 697, 478, 4501, 14630, 1244, 2256, 12333, 14631, 2] */;
|