/** biome-ignore-all lint/complexity/noUselessFragments: <_> */

interface Props {
  name: string
  size?: number
  radius?: number | 0
}

export default (props: Props) => {
  return (
    <>
      <picture>
        <source srcset={`./@dasig/images/${props.name}.avif`} type="image/avif" />
        <source srcset={`./@dasig/images/${props.name}.webp`} type="image/webp" />
        <img style={`border-radius: ${props.radius}rem`} width={props.size} height="auto" decoding="async" loading="lazy" alt={props.name + ' image'} />
      </picture>
    </>
  )
}
