All files / lib/verification icons.ts

94.73% Statements 36/38
100% Branches 4/4
66.66% Functions 2/3
94.73% Lines 36/38

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 851x                                               1x   1x 1x     1x 1x 1x 1x 1x 1x     1x 1x 1x     1x 1x 1x     1x 1x         1x 17x 17x         1x 1x 1x 1x 1x 1x   1x 7x 7x         1x 1x 1x 1x 1x   1x      
/**
 * Verification Badge Icon Mapping
 *
 * Maps verification type codes to Lucide icon names
 */
 
import {
  Mail,
  Phone,
  User,
  CreditCard,
  FileText,
  Building2,
  Github,
  Linkedin,
  Briefcase,
  GraduationCap,
  Award,
  Shield,
  CheckCircle,
  BadgeCheck,
  LucideIcon,
} from 'lucide-react';
 
export const VERIFICATION_ICONS: Record<string, LucideIcon> = {
  // Account level
  email_verified: Mail,
  phone_verified: Phone,
 
  // Government level
  aadhaar: User,
  pan: CreditCard,
  passport: FileText,
  driving_license: CreditCard,
  voter_id: FileText,
  gst: Building2,
 
  // Professional level
  github_connected: Github,
  linkedin_connected: Linkedin,
  work_email: Briefcase,
 
  // Reputation level
  education: GraduationCap,
  certification: Award,
  professional_body: Building2,
 
  // Default
  default: Shield,
};
 
/**
 * Get the icon component for a verification type
 */
export function getVerificationIcon(code: string): LucideIcon {
  return VERIFICATION_ICONS[code] || VERIFICATION_ICONS.default;
}
 
/**
 * Level-specific icons for section headers
 */
export const LEVEL_ICONS: Record<string, LucideIcon> = {
  account: CheckCircle,
  government: Shield,
  professional: Briefcase,
  reputation: BadgeCheck,
};
 
export function getLevelIcon(level: string): LucideIcon {
  return LEVEL_ICONS[level] || CheckCircle;
}
 
/**
 * Display tier icons for the 3-tier public-facing hierarchy
 */
export const DISPLAY_TIER_ICONS: Record<string, LucideIcon> = {
  account_verified: CheckCircle,
  identity_verified: Shield,
  proof_of_work_verified: Award,
};
 
export function getDisplayTierIcon(tier: string): LucideIcon {
  return DISPLAY_TIER_ICONS[tier] || CheckCircle;
}