import { Sparkles, Check } from 'lucide-react'; import { Switch } from '@/components/ui/switch'; import { PlatformFeePayment } from '@/components/PlatformFeePayment'; import { usePlatformFee } from '@/hooks/usePlatformFee'; 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 { isActive, isPlatformOwner, daysRemaining } = usePlatformFee('labProfile'); return (

Go Pro · optional

Free to list. Pro adds a Pro badge and {' '}featured placement at the top of The Lab.

{isActive ? ( Active ) : ( )}
{/* Benefits list */} {!isActive && ( )} {/* Already active */} {isActive && (

{isPlatformOwner ? 'Platform owner — Pro is always on.' : `Pro active · ${daysRemaining} day${daysRemaining !== 1 ? 's' : ''} remaining. Your profile will be featured.`}

)}
{/* Payment appears once opted in and not already active */} {enabled && !isActive && (
{ /* hook auto-updates isActive */ }} context="Your profile stays live for free after Pro expires — you just lose the badge & boost." />
)}
); }