import { BookOpen } from "lucide-react";
import { Link } from "wouter";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";

export function GuideHelp({
  guide,
  label,
}: {
  guide: string;
  label: string;
}) {
  return (
    <Tooltip>
      <TooltipTrigger asChild>
        <Link
          href={`/docs/handbook/${guide}`}
          target="_blank"
          rel="noreferrer"
          aria-label={`Help: ${label}`}
          data-testid={`guide-${guide}`}
          className="inline-flex shrink-0 text-muted-foreground hover:text-foreground transition-colors"
        >
          <BookOpen className="h-3.5 w-3.5" />
        </Link>
      </TooltipTrigger>
      <TooltipContent>{label} — Anleitung in der Dokumentation</TooltipContent>
    </Tooltip>
  );
}
