(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{369:function(e,t,c){"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}}},370:function(e,t,c){"use strict";var n=c(10),r=c.n(n),a=c(6),o=c.n(a),i=c(8),l=c.n(i),s=c(0),u=(c(2),c(1)),d=c(5),b=c.n(d),p=c(4),m=c(41),g=c(81),f=c(78),O=c(273);function j(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function w(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?j(Object(c),!0).forEach((function(t){o()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):j(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}c(541);var h=function(){return Object(s.createElement)("img",{src:p.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500})},k=function(e){var t=e.image,c=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,i=t||{},l=i.thumbnail,u=i.src,d=i.srcset,b=i.sizes,p=w({alt:i.alt||o,onLoad:c,hidden:!n,src:l},a&&{src:u,srcSet:d,sizes:b});return Object(s.createElement)(s.Fragment,null,p.src&&Object(s.createElement)("img",r()({"data-testid":"product-image"},p)),!n&&Object(s.createElement)(h,null))};t.a=Object(g.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,r=e.showProductLink,a=void 0===r||r,i=e.showSaleBadge,d=e.saleBadgeAlign,p=void 0===d?"right":d,g=Object(m.useInnerBlockLayoutContext)().parentClassName,j=Object(m.useProductDataContext)().product,v=Object(s.useState)(!1),y=l()(v,2),E=y[0],P=y[1],S=Object(f.a)().dispatchStoreEvent;if(!j.id)return Object(s.createElement)("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(h,null));var L=!!j.images.length,z=L?j.images[0]:null,_=a?"a":s.Fragment,B=Object(u.sprintf)(
/* translators: %s is referring to the product name */
Object(u.__)("Link to %s",'woocommerce'),j.name),C=w(w({href:j.permalink,rel:"nofollow"},!L&&{"aria-label":B}),{},{onClick:function(){S("product-view-link",{product:j})}});return Object(s.createElement)("div",{className:b()(t,"wc-block-components-product-image",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(_,a&&C,!!i&&Object(s.createElement)(O.default,{align:p,product:j}),Object(s.createElement)(k,{fallbackAlt:j.name,image:z,onLoad:function(){return P(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},541:function(e,t){},896:function(e,t,c){"use strict";c.r(t);var n=c(81),r=c(370),a=c(369);t.default=Object(n.withFilteredAttributes)(a.a)(r.a)}}]);