import { Sparkles, BadgeCheck } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { cn } from '@/lib/utils'; import { isFeaturedActive } from '@/lib/types'; import { useFeaturedVerification } from '@/hooks/useFeaturedVerification'; interface ProBadgeProps { /** The `featuredUntil` unix-seconds timestamp from a parsed entity. */ featuredUntil?: number; className?: string; /** Compact = icon only (for dense card corners). */ compact?: boolean; /** * When set (an addressable `kind:pubkey:d` coordinate), the badge verifies the * featured status against a NIP-57 zap receipt and shows a "Verified" state * when found. Use on detail pages; omit in dense lists to avoid over-fetching. */ entityCoord?: string; } /** * "Pro" badge shown on featured Lab profiles, events, and tours. * Renders nothing if the entity isn't currently featured. */ export function ProBadge({ featuredUntil, className, compact = false, entityCoord }: ProBadgeProps) { const { data: status } = useFeaturedVerification( entityCoord, entityCoord ? featuredUntil : undefined, ); if (!isFeaturedActive(featuredUntil)) return null; const verified = status === 'verified'; return ( {verified ? ( ) : ( )} Pro ); }