import { cn } from "@/lib/utils";

interface AmanahMarkProps {
  className?: string;
  size?: number;
  alt?: string;
}

/** Square AB mark from the AMANAH logo. */
export function AmanahMark({ className, size = 40, alt = "Amanah" }: AmanahMarkProps) {
  return (
    <img
      src="/amanah-logo.png"
      alt={alt}
      width={size}
      height={size}
      className={cn("shrink-0 rounded-[22%] object-cover", className)}
      decoding="async"
    />
  );
}

interface AmanahWordmarkProps {
  className?: string;
  subtitle?: string;
  compact?: boolean;
}

/** Brand name + optional platform subtitle. */
export function AmanahWordmark({
  className,
  subtitle,
  compact = false,
}: AmanahWordmarkProps) {
  return (
    <div className={cn("min-w-0", className)}>
      <p
        className={cn(
          "font-display font-bold tracking-[0.08em] text-primary uppercase",
          compact ? "text-[14px] leading-none" : "text-[16px] leading-none",
        )}
      >
        Amanah
      </p>
      {subtitle ? (
        <p
          className={cn(
            "mt-1 font-semibold tracking-[0.04em] text-brand",
            compact ? "text-[9px]" : "text-[10px]",
          )}
        >
          {subtitle}
        </p>
      ) : (
        <p
          className={cn(
            "mt-1 font-medium tracking-[0.01em] text-brand",
            compact ? "text-[9px] leading-tight" : "text-[10px] leading-tight",
          )}
        >
          Boekhouding &amp; Belastingadvies
        </p>
      )}
    </div>
  );
}
