import Link from "next/link";
import Image from "next/image";
import { cn } from "@/lib/utils";

interface LogoProps {
  className?: string;
  // Kept for API compatibility; the wordmark is baked into the PNG so this is a no-op.
  showWordmark?: boolean;
  variant?: "light" | "dark" | "auto";
}

export function Logo({ className, variant = "auto" }: LogoProps) {
  return (
    <Link
      href="/"
      aria-label="XRemit — home"
      className={cn(
        "inline-flex items-center transition-opacity duration-200 hover:opacity-80",
        className,
      )}
    >
      {(variant === "auto" || variant === "light") && (
        <Image
          src="/logo/logo-for-light.png"
          alt="XRemit"
          width={140}
          height={36}
          priority
          className={cn("h-7 w-auto", variant === "auto" && "dark:hidden")}
        />
      )}
      {(variant === "auto" || variant === "dark") && (
        <Image
          src="/logo/logo-for-dark.png"
          alt="XRemit"
          width={140}
          height={36}
          priority
          className={cn("h-7 w-auto", variant === "auto" && "hidden dark:block")}
        />
      )}
    </Link>
  );
}
