import type { LucideIcon } from 'lucide-react';
import {
  Activity,
  Airplay,
  Archive,
  BarChart3,
  Bell,
  Blocks,
  BookOpen,
  Box,
  BrainCircuit,
  Calendar,
  Camera,
  ChartPie,
  CircleDot,
  Cloud,
  Code,
  Compass,
  CreditCard,
  Database,
  FileText,
  Folder,
  Gamepad2,
  Globe,
  Heart,
  Home,
  Image,
  Inbox,
  Layers,
  Layout,
  LineChart,
  Link,
  List,
  Mail,
  Map,
  MessageCircle,
  Monitor,
  Music,
  Palette,
  PenTool,
  Play,
  Puzzle,
  Radio,
  Rocket,
  Search,
  Settings,
  ShoppingCart,
  Star,
  Sun,
  Table,
  Terminal,
  Timer,
  Users,
  Wand2,
  Zap,
} from 'lucide-react';

const ICON_MAP: Record<string, LucideIcon> = {
  Activity,
  Airplay,
  Archive,
  BarChart3,
  Bell,
  Blocks,
  BookOpen,
  Box,
  BrainCircuit,
  Calendar,
  Camera,
  ChartPie,
  CircleDot,
  Cloud,
  Code,
  Compass,
  CreditCard,
  Database,
  FileText,
  Folder,
  Gamepad2,
  Globe,
  Heart,
  Home,
  Image,
  Inbox,
  Layers,
  Layout,
  LineChart,
  Link,
  List,
  Mail,
  Map,
  MessageCircle,
  Monitor,
  Music,
  Palette,
  PenTool,
  Play,
  Puzzle,
  Radio,
  Rocket,
  Search,
  Settings,
  ShoppingCart,
  Star,
  Sun,
  Table,
  Terminal,
  Timer,
  Users,
  Wand2,
  Zap,
};

export const resolveIcon = (name: string): LucideIcon => ICON_MAP[name] ?? Box;

export const availableIconNames = Object.keys(ICON_MAP);
