(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32,41],{156:function(e,t,a){"use strict";a.r(t),a.d(t,"Block",(function(){return d}));var c=a(0),n=a(1),l=a(4),r=a.n(l),s=a(29),o=a(24),i=a(86),u=a(48);a(276);const d=e=>{const{className:t,align:a}=e,l=Object(i.a)(e),{parentClassName:u}=Object(o.useInnerBlockLayoutContext)(),{product:d}=Object(o.useProductDataContext)();if(!d.id||!d.on_sale)return null;const b="string"==typeof a?`wc-block-components-product-sale-badge--align-${a}`:"";return Object(c.createElement)("div",{className:r()("wc-block-components-product-sale-badge",t,b,{[`${u}__product-onsale`]:u},l.className),style:l.style},Object(c.createElement)(s.a,{label:Object(n.__)("Sale","woocommerce"),screenReaderLabel:Object(n.__)("Product on sale","woocommerce")}))};t.default=Object(u.withProductDataContext)(d)},219:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var c=a(0),n=a(1),l=a(4),r=a.n(l),s=a(3),o=a(24),i=a(86),u=a(48),d=a(97),b=a(156),m=(a(278),a(60));const g=e=>Object(c.createElement)("img",{...e,src:s.PLACEHOLDER_IMG_SRC,alt:"",width:void 0,height:void 0}),p=({image:e,loaded:t,showFullSize:a,fallbackAlt:n,width:l,scale:r,height:s})=>{const{thumbnail:o,src:i,srcset:u,sizes:d,alt:b}=e||{},m={alt:b||n,hidden:!t,src:o,...a&&{src:i,srcSet:u,sizes:d}},p={height:s,width:l,objectFit:r};return Object(c.createElement)(c.Fragment,null,m.src&&Object(c.createElement)("img",{style:p,"data-testid":"product-image",...m}),!e&&Object(c.createElement)(g,{style:p}))},h=e=>{const{className:t,imageSizing:a=m.a.SINGLE,showProductLink:l=!0,showSaleBadge:s,saleBadgeAlign:u="right",height:h,width:O,scale:j,...w}=e,f=Object(i.a)(e),{parentClassName:k}=Object(o.useInnerBlockLayoutContext)(),{product:E,isLoading:y}=Object(o.useProductDataContext)(),{dispatchStoreEvent:N}=Object(d.a)();if(!E.id)return Object(c.createElement)("div",{className:r()(t,"wc-block-components-product-image",{[`${k}__product-image`]:k},f.className)},Object(c.createElement)(g,null));const _=!!E.images.length,L=_?E.images[0]:null,S=l?"a":c.Fragment,v=Object(n.sprintf)(/* translators: %s is referring to the product name */
Object(n.__)("Link to %s","woocommerce"),E.name),B={href:E.permalink,...!_&&{"aria-label":v},onClick:()=>{N("product-view-link",{product:E})}};return Object(c.createElement)("div",{className:r()(t,"wc-block-components-product-image",{[`${k}__product-image`]:k},f.className)},Object(c.createElement)(S,{...l&&B},!!s&&Object(c.createElement)(b.default,{align:u,...w}),Object(c.createElement)(p,{fallbackAlt:E.name,image:L,loaded:!y,showFullSize:a!==m.a.THUMBNAIL,width:O,height:h,scale:j})))};t.b=Object(u.withProductDataContext)(h)},276:function(e,t){},278:function(e,t){},29:function(e,t,a){"use strict";var c=a(0),n=a(4),l=a.n(n);t.a=({label:e,screenReaderLabel:t,wrapperElement:a,wrapperProps:n={}})=>{let r;const s=null!=e,o=null!=t;return!s&&o?(r=a||"span",n={...n,className:l()(n.className,"screen-reader-text")},Object(c.createElement)(r,{...n},t)):(r=a||c.Fragment,s&&o&&e!==t?Object(c.createElement)(r,{...n},Object(c.createElement)("span",{"aria-hidden":"true"},e),Object(c.createElement)("span",{className:"screen-reader-text"},t)):Object(c.createElement)(r,{...n},e))}},353:function(e,t,a){"use strict";const c={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:a(60).a.SINGLE},productId:{type:"number",default:0},isDescendentOfQueryLoop:{type:"boolean",default:!1},isDescendentOfSingleProductBlock:{type:"boolean",default:!1},width:{type:"string"},height:{type:"string"},scale:{type:"string",default:"cover"}};t.a=c},657:function(e,t,a){"use strict";a.r(t);var c=a(48),n=a(219),l=a(353);t.default=Object(c.withFilteredAttributes)(l.a)(n.b)}}]);