/* Metro module 7562; source: modules/premium/native/PremiumPerkCard.tsx; dependencies: [31, 27, 1880, 661, 33, 4584, 7563, 4136, 7007, 6789, 1244, 7564, 7565, 7566, 7567, 7568, 7569, 7570, 7571, 7572, 7573, 7574, 7575, 7576, 7577, 7578, 7579, 4501, 697, 5475, 4573, 7580, 4578, 2] */ function _fun60795(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:6, offset: 0x0170f178, size: 590 bytes, params: 8, frame: 23 const env0_0 = require; const closure = usePerkCardHeight; let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; let value = require(27) /* metro dependency 27 */; const env0_4 = value.View; const env0_5 = value.ScrollView; const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).MAX_PREMIUM_TIER_2_ATTACHMENT_SIZE; const env0_7 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections; value = require(33) /* metro dependency 33 */; const env0_8 = value.jsx; const env0_9 = value.jsxs; const object = {NARROW: 0}; object[0] = 'NARROW'; object.WIDE = 1; object[1] = 'WIDE'; Object = global.Object; const freeze = Object.freeze; const NARROW = object.NARROW; const WIDE = object.WIDE; value = Reflect.apply(freeze, Object, [{[NARROW]: {'width': 300, 'height': 364, 'scaledFontHeight': 440}, [WIDE]: {'width': 320, 'height': 364, 'scaledFontHeight': 440}}]); const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun60797); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPerkCard.tsx'); exports.default = PremiumPerkCard; exports.PerkCardTypes = {CUSTOM_PROFILE: 'customProfile', CLIENT_THEMES: 'clientThemes', SERVER_BOOSTS: 'serverBoosts', GREYED_SERVER_BOOSTS: 'greyServerBoosts', CUSTOM_APP_ICONS: 'customAppIcons', EMOJI: 'emoji', CUSTOM_SOUNDS: 'customSounds', STICKER: 'sticker', EARLY_ACCESS: 'earlyAccess', MEMBER_PRICING: 'memberPricing', LARGE_UPLOADS: 'largeUploads', HD_VIDEO: 'hdVideo', SUPER_REACTIONS: 'superReactions', ENTRACE_SOUNDS: 'entranceSounds', BADGE: 'badge', GREYED_BADGE: 'greyBadge'}; exports.PerkCardVariant = object; exports.PERK_CARD_SIZES = value; exports.usePerkCardHeight = closure; exports.usePremiumPerkCard = usePremiumPerkCard; } function usePerkCardHeight(a0) { // fn#60796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:934, offset: 0x0170f3c6, size: 68 bytes, params: 2, frame: 12 const value2 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale(); const property = env0_11[a0]; return value2 > 1 ? property.scaledFontHeight : property.height; } function _fun60797(a0) { // fn#60797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:1068, offset: 0x0170f40a, size: 529 bytes, params: 2, frame: 19 const object6 = {}; const object7 = {}; const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object7.backgroundColor = BACKGROUND_SURFACE_HIGH; let sm = (importDefault(697) /* metro dependency 697: native */).radii.sm; object7.borderRadius = sm; object7.width = env0_11[a0].width; const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW; copyDataProperties(object7, SHADOW_LOW, undefined); object6.container = object7; const object9 = {width: '100%'}; object9.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object9.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object9.overflow = 'hidden'; object6.headerComponent = object9; const object10 = {width: '100%'}; sm = (importDefault(697) /* metro dependency 697: native */).radii.sm; object10.borderTopLeftRadius = sm; object10.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object6.image = object10; object6.title = {'marginTop': 16, 'marginHorizontal': 16}; const object11 = {'marginTop': 8, 'marginHorizontal': 16}; const value2 = 8; const WIDE = env0_10.WIDE; object11.marginBottom = a0 !== WIDE ? value2 : 24; const NARROW = env0_10.NARROW; copyDataProperties(object11, a0 === NARROW && ({height: '100%'}), sm); object6.description = object11; object6.button = {'marginTop': 'auto', 'marginHorizontal': 16, 'marginBottom': 16}; object6.imageContainer = {'position': 'relative', 'alignItems': 'center', 'justifyContent': 'center'}; const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE; object6.imageOverlayText = {color: WHITE, fontSize: 14}; const object12 = {'position': 'absolute', 'bottom': '10%', 'borderRadius': null, 'backgroundColor': null, 'paddingHorizontal': 12, 'paddingVertical': 4, 'justifyContent': 'center', 'alignItems': 'center'}; object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG; object12.backgroundColor = BACKGROUND_MOD_STRONG; object6.imageOverlayTextContainer = object12; object6.pillTextContainer = {'position': 'absolute', 'width': 'auto', 'top': -8, 'left': 10}; return object6; } function PremiumPerkCard({style, title, titleStyle, description, bodyComponent, headerComponent, imageSrc, buttonOnPress, cta, variant = env0_10.WIDE, imageOverlayText, pillText}) { // fn#60798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7740:2186, offset: 0x0170f61b, size: 881 bytes, params: 2, frame: 35 const Text = (require(4573) /* metro dependency 4573: Text */).Text; var r12; var intl; if (cta !== undefined) { r12 = cta; } else { intl = (require(1244) /* metro dependency 1244: indexNative */).intl; r12 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jVcuVY); } const styles = useStyles(variant); let NARROW = env0_10.NARROW; const value2 = usePerkCardHeight(NARROW); const r6 = imageSrc != null ? imageOverlayText != null ? {((Component) => )(importDefault(5475) /* metro dependency 5475: FastImage */)}{imageOverlayText.toUpperCase()} : ((Component) => )(importDefault(5475) /* metro dependency 5475: FastImage */) : headerComponent != null ? {headerComponent} : null; const r13 = description != null ? {description} : bodyComponent ?? null; const items2 = [styles.container]; NARROW = env0_10.NARROW; items2[1] = variant === NARROW && ({height: value2}); items2[2] = style; const items3 = [pillText != null && ((Component) => )(importDefault(7580) /* metro dependency 7580: PillText */), r6]; items3[2] = {title}; items3[3] = {r13}; items3[4] = buttonOnPress != null && {((Button) =>