import { cn } from '@/lib/cn'

/**
 * The Domainsansar mark.
 *
 * A solid accent tile with the letter form -- no gradient, no glow. It reads as
 * an institutional mark rather than a consumer app icon, which is the intended
 * register for a platform handling five-figure transactions.
 */
export function Logo({
  showWordmark = true,
  className,
}: {
  showWordmark?: boolean
  className?: string
}) {
  return (
    <span className={cn('inline-flex items-center gap-2.5', className)}>
      <svg
        viewBox="0 0 32 32"
        aria-hidden
        className="size-7 shrink-0 rounded-[7px]"
        role="presentation"
      >
        <rect width="32" height="32" rx="7" fill="var(--accent-solid)" />
        <path
          d="M9 9.5h6.2c4.6 0 7.4 2.6 7.4 6.5s-2.8 6.5-7.4 6.5H9V9.5Zm3.5 3v7h2.5c2.5 0 4-1.3 4-3.5s-1.5-3.5-4-3.5h-2.5Z"
          fill="#ffffff"
        />
      </svg>

      {showWordmark && (
        <span className="text-[0.975rem] font-semibold tracking-[-0.02em] text-text-primary">
          Domainsansar
        </span>
      )}
    </span>
  )
}
