(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{260: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}}},261:function(e,t,a){"use strict";var c=a(5),l=a.n(c),n=a(0),s=(a(10),a(1)),o=a(4),r=a.n(o),i=a(2),u=a(28),d=a(57),m=a(50),b=a(205),g=(a(319),a(41));const p=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),O=e=>{let{image:t,onLoad:a,loaded:c,showFullSize:s,fallbackAlt:o}=e;const{thumbnail:r,src:i,srcset:u,sizes:d,alt:m}=t||{},b={alt:m||o,onLoad:a,hidden:!c,src:r,...s&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,b.src&&Object(n.createElement)("img",l()({"data-testid":"product-image"},b)),!c&&Object(n.createElement)(p,null))};t.a=Object(d.withProductDataContext)(e=>{const{className:t,imageSizing:a="full-size",showProductLink:c=!0,showSaleBadge:l,saleBadgeAlign:o="right"}=e,{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[j,w]=Object(n.useState)(!1),{dispatchStoreEvent:f}=Object(m.a)(),h=Object(g.d)(e),k=Object(g.a)(e),y=Object(g.c)(e);if(!d.id)return Object(n.createElement)("div",{className:r()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},k.className),style:{...h.style,...k.style,...y.style}},Object(n.createElement)(p,null));const E=!!d.images.length,S=E?d.images[0]:null,L=c?"a":n.Fragment,z=Object(s.sprintf)(
/* translators: %s is referring to the product name */
Object(s.__)("Link to %s",'woocommerce'),d.name),_={href:d.permalink,rel:"nofollow",...!E&&{"aria-label":z},onClick:()=>{f("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:r()(t,"wc-block-components-product-image",{[i+"__product-image"]:i},k.className),style:{...h.style,...k.style,...y.style}},Object(n.createElement)(L,c&&_,!!l&&Object(n.createElement)(b.default,{align:o,product:d}),Object(n.createElement)(O,{fallbackAlt:d.name,image:S,onLoad:()=>w(!0),loaded:j,showFullSize:"cropped"!==a})))})},319:function(e,t){},531:function(e,t,a){"use strict";a.r(t);var c=a(57),l=a(261),n=a(260);t.default=Object(c.withFilteredAttributes)(n.a)(l.a)}}]);