import Link from "next/link";
import { cn } from "@/lib/cn";

const logos = {
  full: {
    src: "/brand/postvertise-logo.svg",
    width: 148,
    height: 40,
    className: "h-[40px] w-auto max-w-full",
  },
  mark: {
    src: "/brand/postvertise-mark.svg",
    width: 32,
    height: 32,
    className: "size-8",
  },
} as const;

export function Logo({
  href = "/",
  variant = "full",
  className,
}: {
  href?: string;
  variant?: keyof typeof logos;
  className?: string;
}) {
  const logo = logos[variant];

  return (
    <Link
      aria-label="Postvertise home"
      className={cn("inline-flex shrink-0 items-center", className)}
      href={href}
    >
      <img
        src={logo.src}
        alt=""
        width={logo.width}
        height={logo.height}
        className={logo.className}
        decoding="async"
      />
    </Link>
  );
}
