import React from 'react';
import {
  Sparkles,
  Gamepad2,
  Tv2,
  Zap,
  Headphones,
  Cpu,
  Shield,
  Globe,
  Terminal,
  Folder,
  Layers,
  Flame,
  Radio,
  Server,
  Lock,
  Smartphone,
  CreditCard,
  Key
} from 'lucide-react';

interface Props {
  name: string;
  className?: string;
}

const iconMap: Record<string, React.ElementType> = {
  Sparkles,
  Gamepad2,
  Tv2,
  Zap,
  Headphones,
  Cpu,
  Shield,
  Globe,
  Terminal,
  Folder,
  Layers,
  Flame,
  Radio,
  Server,
  Lock,
  Smartphone,
  CreditCard,
  Key,
};

export const CategoryIcon: React.FC<Props> = ({ name, className = 'w-5 h-5' }) => {
  const IconComponent = iconMap[name] || Folder;
  return <IconComponent className={className} />;
};
