import Link from "next/link";
import { TOOL_PAGES } from "@/lib/tool-pages";

export default function RelatedTools({ current }: { current: string }) {
  const others = TOOL_PAGES.filter((t) => t.slug !== current);

  return (
    <p className="text-base text-ink-soft leading-relaxed">
      Weitere Zufalls-Tools:{" "}
      {others.map((t, i) => (
        <span key={t.slug}>
          <Link
            href={`/${t.slug}`}
            className="text-[#c97d60] font-medium hover:underline underline-offset-2 transition-colors"
          >
            {t.label}
          </Link>
          {i < others.length - 2
            ? ", "
            : i === others.length - 2
              ? " sowie "
              : "."}
        </span>
      ))}
    </p>
  );
}

