import Link from "next/link"; import { LogoMark } from "./ui/logo-mark"; import { Badge } from "./ui/badge"; import { label, fmtDate } from "@/lib/utils"; import type { ToolCard as T } from "@/lib/public/queries"; import { ShieldCheck, BookOpenText } from "lucide-react"; export function ToolCard({ t, blurb, className = "" }: { t: T; blurb?: string | null; className?: string }) { return (

{t.name}

{t.vendorName ?? label(t.productType)}{t.primaryCategory ? ` ยท ${t.primaryCategory.name}` : ""}

{t.depth === "deep" && In-depth entry}

{blurb ?? t.summary}

{t.licenseSpdx ?? label(t.sourceModel)} {t.pricingModel.slice(0, 2).map((p) => {label(p)})} {t.executionModes.includes("local") && Local} {t.executionModes.includes("self-hosted") && Self-hosted} {t.productStatus !== "active" && {label(t.productStatus)}} {t.linkState === "ok" ? fmtDate(t.checkedAt) : label(t.linkState)}
); }