import { FileText, Layers, Map as MapIcon, Table } from 'lucide-react';

interface Props {
  type: string;
  className?: string;
  colored?: boolean;
}

export function FileIcon({ type, className = '', colored = false }: Props) {
  if (!colored) {
    switch (type) {
      case 'pdf': return <FileText className={className} />;
      case 'cad': return <Layers className={className} />;
      case 'gis': return <MapIcon className={className} />;
      case 'excel': return <Table className={className} />;
      default: return <FileText className={className} />;
    }
  }

  switch (type) {
    case 'pdf': return <FileText className={`text-red-500 ${className}`} />;
    case 'cad': return <Layers className={`text-cyan-500 ${className}`} />;
    case 'gis': return <MapIcon className={`text-emerald-500 ${className}`} />;
    case 'excel': return <Table className={`text-green-500 ${className}`} />;
    default: return <FileText className={className} />;
  }
}
