// @design-system: icons/MDLogo

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

/**
 * Props for MDLogo
 */
export interface MDLogoProps {
  /** Additional classes on the img element. */
  className?: string;
  /** Accessible title. Defaults to 'Multideal'. */
  title?: string;
  /** Size (width = height) in px. Aspect ratio 1:1. @default 70 */
  size?: number;
  /** Kept for API compatibility - no-op for the raster mark. */
  outline?: boolean;
}

/**
 * MDLogo - Multideal brand mark ("MD pill": cream MD letters on navy disc).
 *
 * Renders /brand/icon.png with @2x srcset. Aspect ratio 1:1; symmetric so no
 * RTL mirroring needed. Single source of truth for every brand-slot in the app.
 *
 * @example
 * ```tsx
 * <MDLogo size={48} />
 * ```
 */
export function MDLogo({ className, title = 'Multideal', size = 70 }: MDLogoProps) {
  return (
    <img
      src="/brand/icon.png"
      srcSet="/brand/icon.png 1x, /brand/icon@2x.png 2x"
      width={size}
      height={size}
      alt={title}
      decoding="async"
      className={cn(className)}
    />
  );
}
