/** * UpgradeWall — intercepts Pro features for Free users */ import { useTranslation } from 'react-i18next' import { Crown, Sparkles, X } from 'lucide-react' import { proFeatureLabel, useEntitlementStore, type ProFeature } from '../../stores/entitlementStore' import AppOverlay from '../common/AppOverlay' export default function UpgradeWall() { const { t } = useTranslation('common') const wall = useEntitlementStore((s) => s.wall) const closeWall = useEntitlementStore((s) => s.closeWall) const openUpgradeTab = useEntitlementStore((s) => s.openUpgradeTab) if (!wall.open) return null const feature = wall.feature as ProFeature | undefined const label = feature ? proFeatureLabel(feature) : null const comingSoon = wall.comingSoon return ( { if (event.target === event.currentTarget) closeWall() }} >
e.stopPropagation()} onMouseDown={(e) => e.stopPropagation()} >

{comingSoon ? t('pro.wallUnlockComingSoon') : t('pro.wallUnlock')}

{wall.message || (comingSoon ? label ? t('pro.wallMessageComingSoonFeature', { feature: label }) : t('pro.wallMessageComingSoon') : label ? t('pro.wallMessageFeature', { feature: label }) : t('pro.wallMessageDefault'))}

) }