import {
  ArrowRight,
  Award,
  BarChart3,
  BookOpen,
  BookOpenCheck,
  BookMarked,
  Briefcase,
  CheckCircle2,
  ClipboardList,
  Clock,
  Download,
  FileText,
  FlaskConical,
  Gauge,
  GraduationCap,
  History,
  Hospital,
  Laptop,
  Layers,
  LayoutList,
  Library,
  ListChecks,
  Lock,
  MapPinned,
  MessageSquare,
  Newspaper,
  PenLine,
  Scale,
  ShieldCheck,
  ShoppingBag,
  Sparkles,
  Stethoscope,
  Target,
  Timer,
  TrendingUp,
  User,
  Users,
  Video,
  Wand2,
  Wrench,
  type LucideIcon,
} from "lucide-react";

const registry: Record<string, LucideIcon> = {
  ArrowRight,
  Award,
  BarChart3,
  BookOpen,
  BookOpenCheck,
  BookMarked,
  Briefcase,
  CheckCircle2,
  ClipboardList,
  Clock,
  Download,
  FileText,
  FlaskConical,
  Gauge,
  GraduationCap,
  History,
  Hospital,
  Laptop,
  Layers,
  LayoutList,
  Library,
  ListChecks,
  Lock,
  MapPinned,
  MessageSquare,
  Newspaper,
  PenLine,
  Scale,
  ShieldCheck,
  ShoppingBag,
  Sparkles,
  Stethoscope,
  Target,
  Timer,
  TrendingUp,
  User,
  Users,
  Video,
  Wand2,
  Wrench,
};

export const ICON_NAMES = Object.keys(registry).sort();

export function lookupIcon(name: string | null | undefined): LucideIcon {
  if (!name) return CheckCircle2;
  return registry[name] ?? CheckCircle2;
}
