component Picture {
  props {
    sources: unknown[] = []
    src: string = ""
    srcset: string = ""
    sizes: string = ""
    alt: string = ""
    width: string = ""
    height: string = ""
    loading: string = "lazy"
    decoding: string = "async"
    fetchpriority: string = "auto"
    class: string = ""
  }
  view {
    <picture {...attrs} class='{class}'>
      {#each sources as source}<source type='{source.type}' srcset='{source.srcset}' sizes='{source.sizes || sizes}' media='{source.media || ""}' />{/each}
      <img src='{src}' srcset='{srcset}' sizes='{sizes}' alt='{alt}' width='{width}' height='{height}' loading='{loading}' decoding='{decoding}' fetchpriority='{fetchpriority}' class="max-w-full" />
    </picture>
  }
}
