import Image from "next/image";
import { cn } from "cn";

/**
 * Horizontal logo (header): mark + Arabic wordmark, 126×40 by default (the open phone menu uses 100×32).
 * The parts are placed in % so any size with the same 126:40 ratio works. Always laid out LTR (dir="ltr"), so start-* = left.
 */
export function LogoHorizontal({ className }: { className?: string }) {
  return (
    <span dir="ltr" className={cn("relative block h-10 w-[126px]", className)}>
      <Image src="/logos/logo-mark.svg" alt="" width={46} height={40} className="absolute top-0 start-0 h-full w-[36.5%]" priority />
      <Image
        src="/logos/logo-text.svg"
        alt=""
        width={73}
        height={29}
        className="absolute top-[13.4%] start-[42.4%] h-[73.2%] w-[57.6%]"
        priority
      />
    </span>
  );
}

/** Stacked logo (footer): mark above the wordmark, 80×84. */
export function LogoStacked({ className = "" }: { className?: string }) {
  return (
    <span dir="ltr" className={`relative block h-[84px] w-20 ${className}`}>
      <Image src="/logos/footer-mark.svg" alt="" width={50} height={44} className="absolute top-0 start-[18.9%] h-[43.7px] w-[49.8px]" />
      <Image src="/logos/footer-text.svg" alt="" width={79} height={32} className="absolute top-[61.6%] start-[0.9%] h-8 w-[78.6px]" />
    </span>
  );
}
