import {
  LayoutDashboard, Activity, Radar, Map, Layers, Shield,
  EyeOff, Anchor, Ship, FileText, List, BarChart3,
  Navigation, Users, Send, Smartphone, Monitor,
  GitBranch, CheckSquare, Ban, Tag, Settings,
  Brain, Cpu, MessageSquare, Database, Wifi, Globe,
  Fingerprint, Megaphone, ScrollText, History, KeyRound,
  type LucideIcon,
} from 'lucide-react';

/**
 * DB icon 문자열 → Lucide React 컴포넌트 매핑.
 * 사이드바에서 사용하는 아이콘만 포함.
 */
const ICON_MAP: Record<string, LucideIcon> = {
  LayoutDashboard,
  Activity,
  Radar,
  Map,
  Layers,
  Shield,
  EyeOff,
  Anchor,
  Ship,
  FileText,
  List,
  BarChart3,
  Navigation,
  Users,
  Send,
  Smartphone,
  Monitor,
  GitBranch,
  CheckSquare,
  Ban,
  Tag,
  Settings,
  Brain,
  Cpu,
  MessageSquare,
  Database,
  Wifi,
  Globe,
  Fingerprint,
  Megaphone,
  ScrollText,
  History,
  KeyRound,
};

export function resolveIcon(name: string | null): LucideIcon | null {
  if (!name) return null;
  return ICON_MAP[name] ?? null;
}
