var l=Object.defineProperty;var i=(e)=>e;function d(e,t){this[e]=i.bind(null,t)}var m=(e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0,configurable:!0,set:d.bind(t,n)})};var p=(e,t)=>()=>(e&&(t=e(e=0)),t);import{Heart as s}from"lucide-react";import{jsx as r,jsxs as o}from"react/jsx-runtime";function f({recipe:e,onSelect:t,onToggleFavorite:n}){return o("button",{type:"button",onClick:()=>t?.(e),className:"flex flex-col gap-3 rounded-2xl border border-border bg-card text-left transition hover:border-violet-400",children:[e.heroImageUrl?r("img",{src:e.heroImageUrl,alt:e.name,className:"h-40 w-full rounded-t-2xl object-cover"}):r("div",{className:"h-40 rounded-t-2xl bg-muted"}),o("div",{className:"space-y-2 p-4",children:[o("div",{className:"flex items-center justify-between",children:[r("p",{className:"font-semibold text-base",children:e.name}),r("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:r(s,{className:`h-4 w-4 ${e.isFavorite?"fill-red-400":""}`})})]}),r("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:e.description}),o("div",{className:"flex flex-wrap gap-3 text-muted-foreground text-xs",children:[e.prepTimeMinutes?o("span",{children:["Prep ",e.prepTimeMinutes,"m"]}):null,e.cookTimeMinutes?o("span",{children:["Cook ",e.cookTimeMinutes,"m"]}):null,e.servings?o("span",{children:[e.servings," servings"]}):null]})]})]})}export{f as RecipeCard};
