import{Heart as l}from"lucide-react";import{jsx as o,jsxs as t}from"react/jsx-runtime";function d({recipe:e,onSelect:r,onToggleFavorite:n}){return t("button",{type:"button",onClick:()=>r?.(e),className:"flex flex-col gap-3 rounded-2xl border border-border bg-card text-left transition hover:border-violet-400",children:[e.heroImageUrl?o("img",{src:e.heroImageUrl,alt:e.name,className:"h-40 w-full rounded-t-2xl object-cover"}):o("div",{className:"h-40 rounded-t-2xl bg-muted"}),t("div",{className:"space-y-2 p-4",children:[t("div",{className:"flex items-center justify-between",children:[o("p",{className:"font-semibold text-base",children:e.name}),o("button",{type:"button",className:`inline-flex items-center justify-center rounded-full border border-transparent p-2 ${e.isFavorite?"text-red-400":"text-muted-foreground hover:text-red-400"}`,onClick:(a)=>{a.stopPropagation(),n?.(e)},children:o(l,{className:`h-4 w-4 ${e.isFavorite?"fill-red-400":""}`})})]}),o("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:e.description}),t("div",{className:"flex flex-wrap gap-3 text-muted-foreground text-xs",children:[e.prepTimeMinutes?t("span",{children:["Prep ",e.prepTimeMinutes,"m"]}):null,e.cookTimeMinutes?t("span",{children:["Cook ",e.cookTimeMinutes,"m"]}):null,e.servings?t("span",{children:[e.servings," servings"]}):null]})]})]})}export{d as RecipeCard};
