(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24,29],{216:function(e,t,a){"use strict";a.r(t);var c=a(0),n=a(1),l=a(4),s=a.n(l),r=a(28),o=a(29),u=a(219),i=a(138),d=a(123),b=a(215),m=a(58);a(330),t.default=Object(m.withProductDataContext)(e=>{const{className:t,align:a}=e,{parentClassName:l}=Object(o.useInnerBlockLayoutContext)(),{product:m}=Object(o.useProductDataContext)(),p=Object(u.a)(e),g=Object(i.a)(e),O=Object(d.a)(e),j=Object(b.a)(e);if(!m.id||!m.on_sale)return null;const f="string"==typeof a?"wc-block-components-product-sale-badge--align-"+a:"";return Object(c.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,f,{[l+"__product-onsale"]:l},g.className,p.className),style:{...g.style,...p.style,...O.style,...j.style}},Object(c.createElement)(r.a,{label:Object(n.__)("Sale","woocommerce"),screenReaderLabel:Object(n.__)("Product on sale","woocommerce")}))})},219:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var c=a(5),n=a(95),l=a(35),s=a(150);const r=e=>{if(!Object(n.b)())return{className:"",style:{}};const t=Object(l.a)(e)?e:{},a=Object(s.a)(t.style);return Object(c.__experimentalUseBorderProps)({...t,style:a})}},28:function(e,t,a){"use strict";var c=a(0),n=a(4),l=a.n(n);t.a=e=>{let t,{label:a,screenReaderLabel:n,wrapperElement:s,wrapperProps:r={}}=e;const o=null!=a,u=null!=n;return!o&&u?(t=s||"span",r={...r,className:l()(r.className,"screen-reader-text")},Object(c.createElement)(t,r,n)):(t=s||c.Fragment,o&&u&&a!==n?Object(c.createElement)(t,r,Object(c.createElement)("span",{"aria-hidden":"true"},a),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,r,a))}},288:function(e,t,a){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},289:function(e,t,a){"use strict";var c=a(6),n=a.n(c),l=a(0),s=a(1),r=a(4),o=a.n(r),u=a(2),i=a(29),d=a(123),b=a(219),m=a(215),p=a(58),g=a(78),O=a(216);a(332);const j=()=>Object(l.createElement)("img",{src:u.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),f=e=>{let{image:t,onLoad:a,loaded:c,showFullSize:s,fallbackAlt:r}=e;const{thumbnail:o,src:u,srcset:i,sizes:d,alt:b}=t||{},m={alt:b||r,onLoad:a,hidden:!c,src:o,...s&&{src:u,srcSet:i,sizes:d}};return Object(l.createElement)(l.Fragment,null,m.src&&Object(l.createElement)("img",n()({"data-testid":"product-image"},m)),!c&&Object(l.createElement)(j,null))};t.a=Object(p.withProductDataContext)(e=>{const{className:t,imageSizing:a="full-size",showProductLink:c=!0,showSaleBadge:n,saleBadgeAlign:r="right"}=e,{parentClassName:u}=Object(i.useInnerBlockLayoutContext)(),{product:p}=Object(i.useProductDataContext)(),[w,y]=Object(l.useState)(!1),{dispatchStoreEvent:h}=Object(g.a)(),k=Object(d.a)(e),E=Object(b.a)(e),_=Object(m.a)(e);if(!p.id)return Object(l.createElement)("div",{className:o()(t,"wc-block-components-product-image",{[u+"__product-image"]:u},E.className),style:{...k.style,...E.style,..._.style}},Object(l.createElement)(j,null));const N=!!p.images.length,L=N?p.images[0]:null,C=c?"a":l.Fragment,S=Object(s.sprintf)(
/* translators: %s is referring to the product name */
Object(s.__)("Link to %s","woocommerce"),p.name),v={href:p.permalink,...!N&&{"aria-label":S},onClick:()=>{h("product-view-link",{product:p})}};return Object(l.createElement)("div",{className:o()(t,"wc-block-components-product-image",{[u+"__product-image"]:u},E.className),style:{...k.style,...E.style,..._.style}},Object(l.createElement)(C,c&&v,!!n&&Object(l.createElement)(O.default,{align:r,product:p}),Object(l.createElement)(f,{fallbackAlt:p.name,image:L,onLoad:()=>y(!0),loaded:w,showFullSize:"cropped"!==a})))})},330:function(e,t){},332:function(e,t){},537:function(e,t,a){"use strict";a.r(t);var c=a(58),n=a(289),l=a(288);t.default=Object(c.withFilteredAttributes)(l.a)(n.a)}}]);