77 lines
4.3 KiB
TypeScript
77 lines
4.3 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
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;
|
|
object2 = {};
|
|
object2.cardContainer = {'width': 250, 'marginEnd': null, 'flex': 1, marginEnd: PX_16};
|
|
const object4 = {height: r11};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.paddingBottom = PX_8;
|
|
object2.scroller = object4;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.scrollerContent = {paddingHorizontal: PX_16};
|
|
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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 binding = env0_3;
|
|
const value2 = binding.useMemo(_fun110578, [listings]);
|
|
const env0_4 = binding.useRef(false);
|
|
const value3 = binding.useCallback(_fun110581, []);
|
|
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
|
const GuildPowerupsSectionHeader = importDefault(14630) /* metro dependency 14630: GuildPowerupsSectionHeader */;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const guildPowerupsSectionHeader = <GuildPowerupsSectionHeader title={intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */)['TXY/b0'])} description={intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).aJv4PB)} />;
|
|
const MarketingCardsScroller = (require(12333) /* metro dependency 12333: MarketingCardsScroller */).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 _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={env0_3[a1 + 1]} index={a1} isScrollingRef={env0_4} />)(importDefault(14631) /* metro dependency 14631: GuildPowerupsLevelCard */)}
|
|
</View>
|
|
);
|
|
}
|
|
|