import Image from "next/image";

const imgFluid = { width: "100%", height: "auto" } as const;

type Layout3ImageProps = {
  src: string;
  alt: string;
  width: number;
  height: number;
  className?: string;
  sizes?: string;
  priority?: boolean;
  fluid?: boolean;
};

export default function Layout3Image({
  src,
  alt,
  width,
  height,
  className,
  sizes,
  priority,
  fluid,
}: Layout3ImageProps) {
  return (
    <Image
      src={src}
      alt={alt}
      width={width}
      height={height}
      className={className}
      sizes={sizes}
      priority={priority}
      style={fluid ? imgFluid : undefined}
    />
  );
}
