import type { LucideIcon } from "lucide-react";
import {
  BarChart3,
  Bell,
  Code,
  CreditCard,
  Gauge,
  Globe,
  HelpCircle,
  LayoutDashboard,
  Plug,
  Repeat,
  Settings,
  Shield,
  ShoppingCart,
  Smartphone,
  Sparkles,
  Store,
  TicketPercent,
  Truck,
  UserCircle,
  Users,
  Wallet,
  Wrench,
} from "lucide-react";

const MAP: Record<string, LucideIcon> = {
  "user-circle": UserCircle,
  "credit-card": CreditCard,
  repeat: Repeat,
  smartphone: Smartphone,
  store: Store,
  truck: Truck,
  "layout-dashboard": LayoutDashboard,
  wallet: Wallet,
  plug: Plug,
  code: Code,
  settings: Settings,
  shield: Shield,
  bell: Bell,
  "ticket-percent": TicketPercent,
  "shopping-cart": ShoppingCart,
  users: Users,
  "bar-chart-3": BarChart3,
  gauge: Gauge,
  globe: Globe,
  sparkles: Sparkles,
  wrench: Wrench,
  "help-circle": HelpCircle,
};

export function resolveHelpIcon(name?: string | null): LucideIcon {
  if (!name) return HelpCircle;
  return MAP[name] ?? HelpCircle;
}
