// Metro module 12446 (f12447). import { useCallback } from "react"; import { ScrollView, View } from "react-native"; import { MAX_PREMIUM_TIER_2_ATTACHMENT_SIZE } from "../PremiumConstants"; import { HelpdeskArticles, UserSettingsSections } from "../../../Constants"; import { useFontScale } from "../../screen/native/useFontScale"; import { useSubscriptionPlansLoaded } from "../../billing/hooks/useSubscriptionPlansLoaded"; import { formatSize } from "../../../utils/FileSizeUtils"; import { openUserSettings } from "../../user_settings/core/native/openUserSettings"; import AnalyticsLocation from "../../app_analytics/AnalyticsLocation"; import { intl, t } from "../../../intl/index.native"; import Module12448 from "../../../_bundle/Module12448"; import Module12449 from "../../../_bundle/Module12449"; import Module12450 from "../../../_bundle/Module12450"; import Module12451 from "../../../_bundle/Module12451"; import Module12452 from "../../../_bundle/Module12452"; import Module12453 from "../../../_bundle/Module12453"; import Module12454 from "../../../_bundle/Module12454"; import Module12455 from "../../../_bundle/Module12455"; import Module12456 from "../../../_bundle/Module12456"; import Module12457 from "../../../_bundle/Module12457"; import Module12458 from "../../../_bundle/Module12458"; import Module12459 from "../../../_bundle/Module12459"; import Module12460 from "../../../_bundle/Module12460"; import Module12461 from "../../../_bundle/Module12461"; import Module12462 from "../../../_bundle/Module12462"; import Module12463 from "../../../_bundle/Module12463"; import Module12464 from "../../../_bundle/Module12464"; import { Text } from "../../../design/components/Text/native/Text"; import HelpdeskUtils from "../../../utils/HelpdeskUtils"; import { createStyles } from "../../../design/components/Styles/native/createStyles"; import Module712 from "../../../_bundle/Module712"; import FastImage from "../../../components_native/common/FastImage"; import PillText from "./components/PillText"; import { Button } from "../../../design/components/Button/native/Button.native"; const r33 = { 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", XBOX_GAME_PASS: "xboxGamePass" }; let c8610_11 = { NARROW: 0, 0: "NARROW", WIDE: 1, 1: "WIDE" }; const r55 = Object; const r57 = {}; r57[c8610_11.NARROW] = { width: 300, height: 364, scaledFontHeight: 440 }; r57[c8610_11.WIDE] = { width: 320, height: 364, scaledFontHeight: 440 }; let c8610_12 = r55.freeze(r57); const useStyles = createStyles((a0) => ({ container: { backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH, borderRadius: Module712.radii.sm, width: c8610_12[a0].width, ...Module712.shadows.SHADOW_LOW }, headerComponent: { width: "100%", borderTopLeftRadius: Module712.radii.sm, borderTopRightRadius: Module712.radii.sm, overflow: "hidden" }, image: { width: "100%", borderTopLeftRadius: Module712.radii.sm, borderTopRightRadius: Module712.radii.sm }, title: { marginTop: 16, marginHorizontal: 16 }, description: { marginTop: 8, marginHorizontal: 16, marginBottom: a0 === c8610_11.WIDE ? 24 : 8, ...a0 === c8610_11.NARROW && { height: "100%" } }, button: { marginTop: "auto", marginHorizontal: 16, marginBottom: 16 }, imageContainer: { position: "relative", alignItems: "center", justifyContent: "center" }, imageOverlayText: { color: Module712.colors.WHITE, fontSize: 14 }, imageOverlayTextContainer: { position: "absolute", bottom: "10%", borderRadius: Module712.radii.round, backgroundColor: Module712.colors.BACKGROUND_MOD_STRONG, paddingHorizontal: 12, paddingVertical: 4, justifyContent: "center", alignItems: "center" }, pillTextContainer: { position: "absolute", width: "auto", top: -8, left: 10 } })); export default function PremiumPerkCard(props) { const { style, title, titleStyle, description, bodyComponent, headerComponent, imageSrc, imageStyle, buttonOnPress, cta = intl.string(t.jVcuVY), variant = c8610_11.WIDE, imageOverlayText, pillText } = props; const styles = useStyles(variant); const NARROW = c8610_11.NARROW; const fontScale = useFontScale(); const r48 = c8610_12[NARROW]; const height = fontScale > 1 ? r48.scaledFontHeight : r48.height; return {pillText != null && } {imageSrc != null ? imageOverlayText != null ? {imageOverlayText.toUpperCase()} : : headerComponent != null ? {headerComponent} : null} {title} {description != null ? {description} : bodyComponent ?? null} {buttonOnPress != null &&