(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0da313"],{"6b0a":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("b-card",{directives:[{name:"hover",rawName:"v-hover"}],attrs:{"no-body":""}},[i("a",{attrs:{href:e.clickUrl()}},[i("b-card-img-lazy",{staticStyle:{height:"15vh","object-fit":"cover"},attrs:{src:e.recipe_image,alt:e.$t("Recipe_Image"),top:""}}),i("div",{staticClass:"card-img-overlay h-100 d-flex flex-column justify-content-right float-right text-right pt-2 pr-1"},[i("a",[null!==e.recipe?i("recipe-context-menu",{staticClass:"float-right",attrs:{recipe:e.recipe}}):e._e()],1)]),0!==e.recipe.waiting_time?i("div",{staticClass:"card-img-overlay w-50 d-flex flex-column justify-content-left float-left text-left pt-2"},[i("b-badge",{staticClass:"mt-1 font-weight-normal",attrs:{pill:"",variant:"light"}},[i("i",{staticClass:"fa fa-clock"}),e._v(" "+e._s(e.recipe.working_time)+" "+e._s(e.$t("min"))+" ")]),i("b-badge",{staticClass:"mt-1 font-weight-normal",attrs:{pill:"",variant:"secondary"}},[i("i",{staticClass:"fa fa-pause"}),e._v(" "+e._s(e.recipe.waiting_time)+" "+e._s(e.$t("min"))+" ")])],1):e._e()],1),i("b-card-body",{staticClass:"p-4"},[i("h6",[i("a",{attrs:{href:e.clickUrl()}},[null!==e.recipe?[e._v(e._s(e.recipe.name))]:[e._v(e._s(e.meal_plan.title))]],2)]),i("b-card-text",{staticStyle:{"text-overflow":"ellipsis"}},[null!==e.recipe?[i("recipe-rating",{attrs:{recipe:e.recipe}}),null!==e.recipe.description?[e.recipe.description.length>e.text_length?i("span",[e._v(" "+e._s(e.recipe.description.substr(0,e.text_length)+"…")+" ")]):e._e(),e.recipe.description.length<=e.text_length?i("span",[e._v(" "+e._s(e.recipe.description)+" ")]):e._e()]:e._e(),i("p",{staticClass:"mt-1"},[i("last-cooked",{attrs:{recipe:e.recipe}}),i("keywords",{staticStyle:{"margin-top":"4px"},attrs:{recipe:e.recipe}})],1),e.detailed?i("div",{staticClass:"row mt-3"},[i("div",{staticClass:"col-md-12"},[i("h6",{staticClass:"card-title"},[i("i",{staticClass:"fas fa-pepper-hot"}),e._v(" "+e._s(e.$t("Ingredients")))]),i("table",{staticClass:"table table-sm text-wrap"},[e._l(e.recipe.steps,(function(t){return[e._l(t.ingredients,(function(e){return[i("Ingredient",{key:e.id,attrs:{detailed:!1,ingredient:e,ingredient_factor:1}})]}))]}))],2)])]):e._e(),e.recipe.internal?e._e():i("b-badge",{attrs:{pill:"",variant:"info"}},[e._v(e._s(e.$t("External")))])]:[e._v(e._s(e.meal_plan.note))]],2)],1),void 0!==e.footer_text?i("b-card-footer",[i("i",{class:e.footer_icon}),e._v(" "+e._s(e.footer_text)+" ")]):e._e()],1)},r=[],s=i("fc0d"),n=i("81d5"),c=i("fa7d"),l=i("ca5b"),o=i("c1df"),p=i.n(o),d=i("a026"),_=i("830a"),f=i("118a");d["default"].prototype.moment=p.a;var m={name:"RecipeCard",mixins:[c["d"]],components:{LastCooked:_["a"],RecipeRating:l["a"],Keywords:n["a"],RecipeContextMenu:s["a"],Ingredient:f["a"]},props:{recipe:Object,meal_plan:Object,footer_text:String,footer_icon:String},computed:{detailed:function(){return void 0!==this.recipe.steps},text_length:function(){return this.detailed?200:120},recipe_image:function(){return null==this.recipe||null===this.recipe.image?window.IMAGE_PLACEHOLDER:this.recipe.image}},methods:{clickUrl:function(){return null!==this.recipe?Object(c["k"])("view_recipe",this.recipe.id):Object(c["k"])("view_plan_entry",this.meal_plan.id)}},directives:{hover:{inserted:function(e){e.addEventListener("mouseenter",(function(){e.classList.add("shadow")})),e.addEventListener("mouseleave",(function(){e.classList.remove("shadow")}))}}}},u=m,g=i("2877"),h=Object(g["a"])(u,a,r,!1,null,"2338d8bc",null);t["default"]=h.exports}}]);