import { Link } from "wouter";
import { Badge } from "@/components/ui/badge";
import { Star, MessageSquare, Wrench, Scale } from "lucide-react";
import { ToolWithStats } from "@workspace/api-client-react";
import { cn } from "@/lib/utils";
import { MiniBarStack } from "@/components/mini-bars";
export const TABLE_GRID =
"grid-cols-[minmax(0,2fr)_minmax(0,1fr)_80px_80px]";
export function ToolRow({
tool,
density,
className,
compare,
}: {
tool: ToolWithStats;
density: "cozy" | "compact";
className?: string;
compare?: { selected: boolean; onToggle: () => void };
}) {
const compact = density === "compact";
return (
{compare && (
)}
{tool.iconUrl ? (

{
(e.target as HTMLImageElement).style.display = "none";
}}
/>
) : (
)}
{tool.name}
{!compact && (
{tool.description}
)}
{tool.category}
{tool.avgCombined ? tool.avgCombined.toFixed(1) : "N/A"}
{!compact &&
}
{tool.ratingCount}
);
}