import type { BrigadeHit } from "@/lib/search/types";

/** Eine Wehr-Trefferzeile (Name, Ort, PLZ). */
export function BrigadeResultRow({ hit }: { hit: BrigadeHit }) {
  const ortLine = [hit.plz, hit.ort].filter(Boolean).join(" ");
  return (
    <li className="flex items-center justify-between gap-4 border-b border-rand px-1 py-3 last:border-0">
      <a
        href={`/wehren/${hit.brigadeId}`}
        className="min-w-0 truncate font-medium text-navy hover:underline"
      >
        {hit.name}
      </a>
      {ortLine ? (
        <span className="shrink-0 text-sm text-anthrazit/60">{ortLine}</span>
      ) : null}
    </li>
  );
}
