import {
  BookOpen,
  Building2,
  Handshake,
  Heart,
  Paintbrush,
  Star,
  TreePine,
  Users,
  Utensils,
} from 'lucide-react';
import type { CommunityCategoryIconKey } from '@/shared/constants/community';

interface CommunityIconProps {
  readonly iconKey: CommunityCategoryIconKey;
  readonly size?: number;
}

export function CommunityIcon({ iconKey, size = 16 }: CommunityIconProps) {
  if (iconKey === 'utensils') return <Utensils size={size} />;
  if (iconKey === 'heart') return <Heart size={size} />;
  if (iconKey === 'users') return <Users size={size} />;
  if (iconKey === 'bookOpen') return <BookOpen size={size} />;
  if (iconKey === 'building') return <Building2 size={size} />;
  if (iconKey === 'tree') return <TreePine size={size} />;
  if (iconKey === 'star') return <Star size={size} />;
  if (iconKey === 'paintbrush') return <Paintbrush size={size} />;
  return <Handshake size={size} />;
}
