
import { cn } from "@/lib/utils";
import logo from "@/assets/logo.png";
/**
 * Lockup horizontal : ◆ + "Rubis" (+ optionnel "sur l'ongle" en suffixe italique muted).
 * À utiliser dans les headers, le sidebar, les emails.
 *
 * Cf. /docs/marque.md §2 et le pattern de la landing.
 */
type BrandProps = {
  /** Affiche le suffixe "sur l'ongle" en italique muted. */
  withSuffix?: boolean;
  /** Taille du gem (le wordmark s'aligne dessus). */
  gemSize?: number;
  className?: string;
  onlyImage?: boolean;
};

export function Brand({ withSuffix = false, onlyImage = false, className }: BrandProps) {
  return (
    <span
      className={cn(
        "inline-flex items-center gap-2.5 font-display text-ink",
        "text-[19px] font-extrabold tracking-[-0.02em]",
        className,
      )}
    >
      {onlyImage ? (
        <img src={logo} alt="Logo" className="w-10 h-10 border-2 border-rubis rounded-xl" />
      ) : (
        <>
          <img src={logo} alt="Logo" className="w-8 h-8 border-2 border-rubis rounded-xl" />
          <span className="leading-none">
            Rubis
            {withSuffix && (
              <span
                className={cn(
                  "ml-1 font-display italic font-medium text-ink-3",
                  "text-[12.5px] tracking-[-0.005em]",
                )}
              >
                sur l&apos;ongle
              </span>
            )}
          </span>
        </>
      )}
    </span>
  );
}
