import OptimizedImage from "./OptimizedImage.wrn"
import { Card } from "@wrnexus/ui"

component ImageCard {
  props {
    title: string = ""
    description: string = ""
    src: string = ""
    alt: string = ""
    width: string = ""
    height: string = ""
    href: string = ""
    actionLabel: string = ""
    color: string = "primary"
    size: string = "md"
    class: string = ""
  }
  view {
    <Card {...attrs} title='{title}' description='{description}' actionHref='{href}' actionLabel='{actionLabel}' color='{color}' size='{size}' class='{class}'>
      <OptimizedImage src='{src}' alt='{alt}' width='{width}' height='{height}' rounded="true" color='{color}' size='{size}' />
      <slot></slot>
    </Card>
  }
}
