import { cn } from "@/lib/utils";
import { FieldError } from "react-hook-form";

type TooltipContentProps = {
  list: Record<string, string>;
  error?: FieldError;
};
export function TooltipContent({ error, list }: TooltipContentProps) {
  const arr = Object.values(list);

  return (
    <div className="w-full">
      <h3 className="text-lg font-bold"></h3>
      {arr.map((value, i) => (
        <p
          className={cn(
            error && value === error?.message
              ? "text-red-600"
              : "text-neutral-400",
          )}
          key={i}
        >
          {value}
        </p>
      ))}
    </div>
  );
}
