import type { ComponentType } from 'react';
import {
  HouseIcon,
  RouteIcon,
  GraduationCapIcon,
  ChartBarIcon,
  ShieldIcon,
  UsersIcon,
  ShoppingBagIcon,
  TreeIcon,
  TagIcon,
} from '../components/ui/icons';

const GROUP_ICONS: Record<string, ComponentType<{ className?: string }>> = {
  Properties: HouseIcon,
  'Property prices': TagIcon,
  Transport: RouteIcon,
  Education: GraduationCapIcon,
  Schools: GraduationCapIcon,
  'Defining characteristics': TreeIcon,
  'Area development': ChartBarIcon,
  Crime: ShieldIcon,
  Neighbours: UsersIcon,
  Amenities: ShoppingBagIcon,
  Environment: TreeIcon,
  Property: TagIcon,
};

export function getGroupIcon(group: string): ComponentType<{ className?: string }> | null {
  return GROUP_ICONS[group] ?? null;
}
