import AppImage from '@/components/ui/AppImage';
import { BRAND_IMAGES } from '@/infrastructure/images';
import { cn } from '@/lib/utils';

interface LogoProps {
  size?: 'sm' | 'md' | 'lg';
  className?: string;
}

const sizes = {
  sm: 'h-10 w-10',
  md: 'h-12 w-12',
  lg: 'h-20 w-20',
};

export default function Logo({ size = 'md', className }: LogoProps) {
  return (
    <div
      className={cn(
        'relative shrink-0 overflow-hidden rounded-full ring-2 ring-cream-200',
        sizes[size],
        className
      )}
    >
      <AppImage
        src={BRAND_IMAGES.logo}
        alt="Kött Gård"
        fill
        className="object-cover"
        sizes="(max-width: 640px) 40px, 80px"
        priority
        quality={95}
      />
    </div>
  );
}