(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{322:function(t,e,r){"use strict";r.r(e);r(230),r(28),r(32),r(54),r(14),r(18);var o=r(234),n="basis-full",l="md:basis-6/12",d={name:"TzProductCard",components:{TzCta:o.default},props:{blockId:{type:[Number,String],default:()=>null},bodyStyle:{type:Object,default:()=>({})},buttonClasses:{type:[Array,String],default:()=>["black-outline"]},cardClasses:{type:[String,Array],default:()=>""},cardPadding:{type:Boolean,default:()=>!0},centeredContent:{type:Boolean,default:()=>!0},contentClasses:{type:[Array,String],default:()=>""},contentCols:{type:Object,default:()=>({sm:n,md:l})},contentPadding:{type:Boolean,default:()=>!1},defaultButtonBgClass:{type:String,default:()=>"bg-transparent"},defaultButtonBorderClass:{type:String,default:()=>"border-neutral-700"},defaultButtonTextClass:{type:String,default:()=>"text-neutral-700"},direction:{type:String,default:()=>"col"},headingStyle:{type:Object,default:()=>({})},headlineClasses:{type:[Array,String],default:()=>"sm:text-xl text-lg"},imgClasses:{type:[Array,String],default:()=>"std-img"},imgClassesGtSm:{type:[Array,String],default:()=>""},imgCols:{type:Object,default:()=>({sm:n,md:l})},index:{type:[Number,String],default:()=>null},justifyContent:{type:[Array,String],default:()=>"justify-space-between"},location:{type:Object,default:()=>({})},outlineCard:{type:Boolean,default:()=>!1},product:{type:Object,default:()=>({})},selfCenterContent:{type:Boolean,default:()=>!1},shadowCard:{type:Boolean,default:()=>!0},pages:{type:Object,default:()=>({})},parentBg:{type:Object,default:()=>({})},skeletonHeight:{type:[String,Number],default:()=>1},whiteBg:{type:Boolean,default:()=>!0}},data:()=>({whiteBackground:"bg-white"}),computed:{contentColumns(){if(!this.hasImage)return"";var t=[];for(var e in this.contentCols)t.push(this.contentCols[e]);return t.join(" ")},ctaId(){var t=this.blockId?"cta-product-"+this.blockId:"cta-product-"+Math.random().toString(36).substr(2,9);return t+="-"+this.randomOrIndex},hasImage(){return!!(this.product&&this.product.image&&this.product.image.src)},imageColumns(){var t=[];if(!(this.product&&(this.product.title||this.product.offer||this.product.description)&&this.product.buttons&&this.product.buttons.length))return n;for(var e in this.imgCols)t.push(this.imgCols[e]);return t.join(" ")},randomOrIndex(){return null!==this.index?this.index:Math.random().toString(36).substr(2,9)}},mounted(){this.whiteBg||(this.whiteBackground="")},methods:{getButtonClass(button){var t=[];return this.btnClasses&&("string"==typeof this.buttonClasses?t.push(this.buttonClasses):Array.isArray(this.buttonClasses)&&(t=[...this.buttonClasses])),[{"text-neutral-700":"text-neutral-700"===button.textColor||"text-neutral"===this.defaultButtonTextClass&&!button.textColor,"text-white":"white"===button.textColor||"white"===this.defaultButtonTextClass&&!button.textColor,"bg-transparent":"transparent"===button.backgroundColor||"transparent"===this.defaultButtonBgClass&&!button.backgroundColor,"bg-accent":"accent"===button.backgroundColor||"accent"===this.defaultButtonBgClass&&!button.backgroundColor,"bg-extra":"extra"===button.backgroundColor||"extra"===this.defaultButtonBgClass&&!button.backgroundColor,"bg-white":"white"===button.backgroundColor||"white"===this.defaultButtonBgClass&&!button.backgroundColor,"border-neutral-700":"border-neutral-700"===button.borderColor||"border-neutral-700"===this.defaultButtonBorderClass&&!button.borderColor,"border-white":"white"===button.borderColor||"white"===this.defaultButtonBorderClass&&!button.borderColor,"border-accent":"accent"===button.borderColor||"accent"===this.defaultButtonBorderClass&&!button.borderColor,"border-extra":"extra"===button.borderColor||"extra"===this.defaultButtonBorderClass&&!button.borderColor},...t]}}},c=r(9),component=Object(c.a)(d,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex product-card grow shrink-0",class:{"p-4":t.cardPadding}},[e("div",{ref:"productCard",staticClass:"flex grow",class:[t.cardClasses,{shadow:t.shadowCard,"no-box-shadow":!t.shadowCard||"white"===t.parentBg.backgroundColor,"bg-white":!(t.outlineCard||"color"===t.parentBg.type&&"white"===t.parentBg.backgroundColor),"bg-gray-200":!t.outlineCard&&"color"===t.parentBg.type&&"white"===t.parentBg.backgroundColor}]},[e("div",{staticClass:"flex basis-full",class:["row"===t.direction?"flex-row flex-wrap sm:flex-nowrap":"flex-col",!t.hasImage&&t.centeredContent&&"justify-center"]},[t.hasImage?e("div",{class:["row"===t.direction?t.imageColumns:""]},[e("tz-lazy-img",{attrs:{src:t.product.image&&t.product.image.src,"original-src":t.product.image&&(t.product.image.original||t.product.image.src),"img-classes":[t.imgClasses],"img-classes-gt-sm":[t.imgClassesGtSm],"light-box":!0,"background-img":!1,"skeleton-height":t.skeletonHeight,alt:t.product.image&&t.product.image.alt_text,"skeleton-by":"padding"}})],1):t._e(),t._v(" "),t.product.title||t.product.description||t.product.offer||t.product.buttons&&t.product.buttons.length?e("div",{class:[t.contentClasses,"row"===t.direction?t.contentColumns+" flex flex-row items-start justify-start":""]},[e("div",{staticClass:"flex-col flex",class:["justify-space-between"===t.justifyContent?"":t.justifyContent,{"self-center":t.selfCenterContent,"items-center":t.centeredContent,"justify-space-between":!t.product.hideButton&&"justify-space-between"===t.justifyContent,"justify-start":t.product.hideButton,"p-6":t.contentPadding}]},[t.product.title?e("div",[e("div",{class:[t.headlineClasses,{"text-center":t.centeredContent,"mb-2":t.product.offer||t.product.description}],style:{"font-family":t.headingStyle.family,"font-weight":t.headingStyle.headingWeight},domProps:{innerHTML:t._s(t.product.title)}})]):t._e(),t._v(" "),t.product.offer?e("div",[e("div",{staticClass:"sm:text-3xl text-2xl",class:{"text-center":t.centeredContent,"text-accent":!(t.contentClasses.includes("white")||t.contentClasses.includes("white")),"mb-2":t.product.description},style:{"font-family":t.bodyStyle.family,"font-weight":t.bodyStyle.headingWeight},domProps:{innerHTML:t._s(t.product.offer)}})]):t._e(),t._v(" "),t.product.description?e("div",[e("div",{staticClass:"product-description",class:{"text-center":t.centeredContent},style:{"font-family":t.bodyStyle.family,"font-weight":t.bodyStyle.bodyWeight},domProps:{innerHTML:t._s(t.product.description)}})]):t._e(),t._v(" "),t.product.buttons&&t.product.buttons.length?e("div",{staticClass:"mt-4"},t._l(t.product.buttons,(function(button,r){return e("tz-cta",{key:r,attrs:{"button-id":t.ctaId,classes:t.getButtonClass(button),location:t.location,schema:button}})})),1):t._e()])]):t._e()])])])}),[],!1,null,"02f8b461",null);e.default=component.exports}}]);