import {
  Baby,
  Backpack,
  Banknote,
  Bone,
  Bus,
  Car,
  CarTaxiFront,
  Construction,
  FerrisWheel,
  Flame,
  Fuel,
  Gamepad2,
  Gift,
  GlassWater,
  Globe,
  GraduationCap,
  Hammer,
  HandIcon,
  Home,
  type LucideIcon,
  Music,
  ParkingCircle,
  Phone,
  Pizza,
  Plane,
  Plug,
  Popcorn,
  Shirt,
  ShoppingCart,
  Sofa,
  Sprout,
  Stethoscope,
  TrainFront,
  Trophy,
  Utensils,
  UtilityPole,
  Wine,
  Zap,
  type LucideProps,
  Paintbrush,
  Trash,
  Wrench,
} from 'lucide-react';
import { type ForwardRefExoticComponent } from 'react';

export const CategoryIcons: Record<string, LucideIcon> = {
  games: Gamepad2,
  movies: Popcorn,
  music: Music,
  sports: Trophy,
  entertainment: FerrisWheel,
  food: Pizza,
  diningOut: Utensils,
  groceries: ShoppingCart,
  liquor: Wine,
  home: Home,
  electronics: Plug,
  furniture: Sofa,
  supplies: Sofa,
  maintenance: Construction,
  mortgage: HandIcon,
  pets: Bone,
  rent: Home,
  services: Hammer,
  life: Sprout,
  childcare: Baby,
  clothing: Shirt,
  education: GraduationCap,
  gifts: Gift,
  medical: Stethoscope,
  taxes: Banknote,
  travel: Backpack,
  bus: Bus,
  train: TrainFront,
  car: Car,
  fuel: Fuel,
  parking: ParkingCircle,
  plane: Plane,
  taxi: CarTaxiFront,
  utilities: Wrench,
  electricity: Zap,
  gas: Flame,
  internet: Globe,
  phone: Phone,
  water: GlassWater,
  general: Banknote,
  cleaning: Paintbrush,
  trash: Trash,
};

export const CategoryIcon: React.FC<{ category: string; className?: string }> = ({
  category,
  ...props
}) => {
  const Icon = CategoryIcons[category] ?? Banknote;

  return <Icon {...props} />;
};
