import { Sparkles, Check } from 'lucide-react'; import { Switch } from '@/components/ui/switch'; import { PlatformFeePayment } from '@/components/PlatformFeePayment'; import { usePlatformFee } from '@/hooks/usePlatformFee'; import { useTranslation } from '@/contexts/language'; import { cn } from '@/lib/utils'; interface LabProUpgradeProps { /** Whether the user opted in to Pro. */ enabled: boolean; onEnabledChange: (enabled: boolean) => void; /** Accent color class for the entity (e.g. "text-orange-400"). */ accentText?: string; /** Addressable coordinate `kind:pubkey:d` for zap-receipt verification. */ entityCoord?: string; className?: string; } /** * Opt-in "Go Pro" upgrade for Lab profiles. * * Free profiles publish without this. Toggling it on reveals the Lightning fee * payment; once paid (or for platform owners), the profile is published with a * `featured` tag that unlocks the Pro badge + featured placement in The Lab. * * There is NO hard paywall — a basic profile is always free. */ export function LabProUpgrade({ enabled, onEnabledChange, accentText = 'text-amber-400', entityCoord, className, }: LabProUpgradeProps) { const { t } = useTranslation(); const { isActive, isPlatformOwner, daysRemaining } = usePlatformFee('labProfile'); return (
{t('labUi.proUpgrade.goPro')} {t('labUi.proUpgrade.optional')}
{t('labUi.proUpgrade.freeTo')} {t('labUi.proUpgrade.proBadge')} and {' '}{t('labUi.proUpgrade.featuredPlacement')} {t('labUi.proUpgrade.atTop')}
{isPlatformOwner ? t('labUi.proUpgrade.platformOwner') : t(daysRemaining === 1 ? 'labUi.proUpgrade.proActiveOne' : 'labUi.proUpgrade.proActiveMany', { count: daysRemaining })}
)}