import { cn } from '@/lib/utils'; import { crewBadge, ACTIVITY_META, type CrewActivity } from '@/lib/crewHelpers'; import type { SkateCrew } from '@/lib/types'; /** * A small "legitimacy" badge (OG / Verified / Established) derived from a crew's * founding year, NIP-05 and member count. Social proof for the directory. */ export function CrewRepBadge({ crew, confirmedMembers, className, }: { crew: Pick; confirmedMembers?: number; className?: string; }) { const badge = crewBadge(crew, confirmedMembers); if (badge.key === 'crew') return null; const styles: Record = { og: 'bg-amber-500/15 text-amber-300 border-amber-500/40', verified: 'bg-teal-500/15 text-teal-300 border-teal-500/40', established: 'bg-fuchsia-500/15 text-fuchsia-300 border-fuchsia-500/40', }; return ( {badge.emoji} {badge.label} ); } /** * A subtle activity pulse ("🔥 Active this week"). Dormant crews render nothing * unless `showDormant` is set, so the grid highlights life rather than death. */ export function CrewActivityPulse({ activity, showDormant = false, className, }: { activity: CrewActivity | undefined; showDormant?: boolean; className?: string; }) { if (!activity) return null; // In dense card grids we only surface positive signals — hide dormant crews. if (activity.level === 'dormant' && !showDormant) return null; const meta = ACTIVITY_META[activity.level]; const isHot = activity.level === 'hot'; return ( 0 ? `${activity.upcomingEvents} upcoming event${activity.upcomingEvents === 1 ? '' : 's'}` : meta.label } > {isHot && ( )} {activity.upcomingEvents > 0 ? `${activity.upcomingEvents} event${activity.upcomingEvents === 1 ? '' : 's'} coming` : meta.label} ); }