/* Metro module 14631; source: modules/premium/powerups/native/GuildPowerupsLevelCard.tsx; dependencies: [31, 27, 8259, 661, 14632, 33, 4501, 697, 4589, 7958, 14633, 14634, 4573, 1244, 2256, 14635, 14636, 14637, 14660, 14644, 2] */ function _fun110585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:6, offset: 0x0237e1fe, size: 1002 bytes, params: 8, frame: 25 var object2; const env0_0 = require; const closure = GuildPowerupLevelBody; 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(8259) /* metro dependency 8259: GuildPowerupsConstants */; const env0_5 = value.LevelCardPosition; const env0_6 = value.PowerupActiveStatusType; value = require(661) /* metro dependency 661: Constants */; const env0_7 = value.BoostedGuildTiers; const env0_8 = value.HorizontalGradient; const env0_9 = (require(14632) /* metro dependency 14632: GuildBoostingMarketingConstants */).TIER_CARDS; value = require(33) /* metro dependency 33 */; const env0_10 = value.jsx; const env0_11 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object2 = {}; object2.cardContainer = {flex: 1}; object2.card = {'padding': 0, 'overflow': 'hidden', 'flex': 1}; const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24; object2.progressContainer = {marginVertical: PX_24, position: 'relative'}; let BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE; object2.progress = {height: 6, backgroundColor: BACKGROUND_MOD_SUBTLE}; let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.progressStart = {marginStart: PX_16}; const object3 = {}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object3.marginEnd = PX_16; object3.borderTopEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object3.borderBottomEndRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object2.progressEnd = object3; const object4 = {'backgroundColor': null, 'width': 28, 'height': 28, 'start': null, 'top': -11}; const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT; object4.backgroundColor = CARD_BACKGROUND_DEFAULT; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object4.start = PX_16 - 2; object2.boostContainerBackground = object4; const object5 = {'padding': null, 'borderRadius': null, 'position': 'absolute', 'width': 24, 'height': 24, 'top': -9, 'start': null, 'alignItems': 'center', 'justifyContent': 'center'}; const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object5.padding = PX_4; object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object5.start = PX_16; BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE; object5.backgroundColor = BACKGROUND_MOD_SUBTLE; object2.boostContainer = object5; const GUILD_BOOSTING_PINK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GUILD_BOOSTING_PINK; object2.boostContainerActive = {backgroundColor: GUILD_BOOSTING_PINK}; BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE; object2.boostContainerInactive = {backgroundColor: BACKGROUND_MOD_SUBTLE}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.contentContainer = {'padding': null, 'paddingTop': 0, 'flex': 1, padding: PX_16}; const object9 = {flexDirection: 'column'}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object9.marginTop = PX_16; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object9.gap = PX_8; object2.perkRowContainer = object9; object2.perkRow = {'flexDirection': 'row', 'alignItems': 'center'}; object2.perkRowStyle = {'flexDirection': 'row', 'alignItems': 'center'}; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object2.perkText = {marginStart: PX_8}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.footerContainer = {marginTop: 'auto', paddingTop: PX_16}; const env0_12 = Reflect.apply(createStyles, value, [object2]); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/native/GuildPowerupsLevelCard.tsx'); exports.default = GuildPowerupsLevelCard; exports.GuildPowerupLevelBody = closure; } function GuildLevelPowerupHeader({active, nextActive, position}) { // fn#110586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:1616, offset: 0x0237e5e8, size: 519 bytes, params: 2, frame: 23 var r7; var boostContainerInactive; var backgroundColor; var items; var boostContainerActive; const styles = useStyles(); if (active) { if (nextActive !== false) { boostContainerActive = styles.boostContainerActive; backgroundColor = boostContainerActive.backgroundColor; items = [backgroundColor]; boostContainerActive = styles.boostContainerActive; backgroundColor = boostContainerActive.backgroundColor; items[1] = backgroundColor; r7 = items; } else if (active) { if (nextActive === false) { backgroundColor = styles.boostContainerActive.backgroundColor; items = [backgroundColor]; backgroundColor = styles.boostContainerInactive.backgroundColor; items[1] = backgroundColor; r7 = items; } else { boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items = [backgroundColor]; boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items[1] = backgroundColor; r7 = items; } } else { boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items = [backgroundColor]; boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items[1] = backgroundColor; r7 = items; } } else if (active) { if (nextActive === false) { backgroundColor = styles.boostContainerActive.backgroundColor; items = [backgroundColor]; backgroundColor = styles.boostContainerInactive.backgroundColor; items[1] = backgroundColor; r7 = items; } else { boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items = [backgroundColor]; boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items[1] = backgroundColor; r7 = items; } } else { boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items = [backgroundColor]; boostContainerInactive = styles.boostContainerInactive; backgroundColor = boostContainerInactive.backgroundColor; items[1] = backgroundColor; r7 = items; } const defaultImport = importDefault(4589) /* metro dependency 4589 */; const object3 = {}; let START = HorizontalGradient.START; object3.start = START; let END = HorizontalGradient.END; object3.end = END; object3.colors = r7; START = LevelCardPosition.START; END = LevelCardPosition.END; object3.style = [styles.progress, position === START && styles.progressStart, position === END && styles.progressEnd]; const items2 = [((Component) => )(defaultImport)]; items2[1] = ; const items4 = [styles.boostContainer]; items4[1] = active && styles.boostContainerActive; const BoostGemIcon = (require(7958) /* metro dependency 7958: BoostGemIcon */).BoostGemIcon; const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE; items2[2] = ; return ( {items2} ); } function GuildPowerupLevelBody({isActive, index}) { // fn#110587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:2324, offset: 0x0237e7ef, size: 296 bytes, params: 2, frame: 25 const styles = useStyles(); const {textColor, iconColor} = (importDefault(14633) /* metro dependency 14633: useGuildPowerupColorConfig */)(isActive); const value3 = iconColor.useMemo(_fun110588, [index, iconColor, textColor, styles]); const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; return ( {value3} {intl.string((importDefault(2256) /* metro dependency 2256: GuildPowerupsMessages */).nIj3LZ)} ); } function GuildPowerupsLevelCard({guildId, powerup, nextPowerup, index, isScrollingRef}) { // fn#110590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:3089, offset: 0x0237ea71, size: 583 bytes, params: 2, frame: 30 const styles = useStyles(); const value3 = (importDefault(14635) /* metro dependency 14635: usePowerupActiveStatus */)(guildId, powerup); const value4 = (importDefault(14635) /* metro dependency 14635: usePowerupActiveStatus */)(guildId, nextPowerup); const value5 = (require(14636) /* metro dependency 14636: useCalculatePowerupCardStatus */).useCalculatePowerupCardStatus(powerup, value3, false); let type = value3.type; let INACTIVE = PowerupActiveStatusType.INACTIVE; const value6 = type !== INACTIVE; type = value4.type; INACTIVE = PowerupActiveStatusType.INACTIVE; const value7 = type !== INACTIVE; const value8 = (importDefault(14637) /* metro dependency 14637: useGuildPowerupOnShowMore */)(guildId, powerup); const r7 = index === 0 ? LevelCardPosition.START : nextPowerup == null ? LevelCardPosition.END : LevelCardPosition.MIDDLE; const value9 = env0_3.useCallback(_fun110591, [isScrollingRef, value8]); const GuildPowerupsCard = importDefault(14660) /* metro dependency 14660: GuildPowerupsCard */; const guildLevelPowerupHeader = ; const Text = (require(4573) /* metro dependency 4573: Text */).Text; const items2 = [{powerup.title}]; items2[1] = ; const GuildPowerupsCardFooter = (require(14644) /* metro dependency 14644: GuildPowerupsCardFooter */).GuildPowerupsCardFooter; items2[2] = ; return ( {guildLevelPowerupHeader} {items2} ); } function _fun110588() { // fn#110588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:2442, offset: 0x0237e917, size: 113 bytes, params: 1, frame: 15 var environment; const value = environment.__proto__; const property = TIER_CARDS[index]; if (property == null) { return []; } const tier = property.tier; const TIER_3 = BoostedGuildTiers.TIER_3; return (tier === TIER_3 ? property.perks.slice(0, -1) : property.perks)?.map(_fun110589); } function _fun110591() { // fn#110591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:3396, offset: 0x0237ecb8, size: 29 bytes, params: 1, frame: 9 if (!isScrollingRef.current) { env0_1(); } } function _fun110589(a0, a1) { // fn#110589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14828:2559, offset: 0x0237e988, size: 233 bytes, params: 3, frame: 24 const iconForPerk = (require(14634) /* metro dependency 14634: GuildBoostingMarketingUtils */).getIconForPerk(a0.perkIcon); const stylesBinding = styles; const perkRowStyle = stylesBinding.perkRowStyle; const value4 = ((Component) => )(iconForPerk); const Text = (require(4573) /* metro dependency 4573: Text */).Text; return ( {value4} {a0.getCopy()} ); }