(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{530:function(t,c,e){"use strict";e.r(c);var o=e(11),n=e.n(o),a=e(5),r=e.n(a),u=e(0),d=(e(2),e(8)),b=e.n(d),i=e(1),l=e(85),s=e(843),p=e(26),_=e(531),k=e(38),j=e(68),w=(e(549),function(t){var c=t.product,e=Object(u.useRef)(!0),o=c.id,a=c.permalink,r=c.add_to_cart,d=c.has_options,k=c.is_purchasable,j=c.is_in_stock,w=Object(l.a)().dispatchStoreEvent,O=Object(s.a)(o),m=O.cartQuantity,f=O.addingToCart,v=O.addToCart;Object(u.useEffect)((function(){e.current?e.current=!1:Object(_.c)()}),[m]);var E=Number.isFinite(m)&&m>0,C=!d&&k&&j,h=Object(p.decodeEntities)((null==r?void 0:r.description)||""),g=E?Object(i.sprintf)(Object(i._n)("%d in cart","%d in cart",m,'woocommerce'),m):Object(p.decodeEntities)((null==r?void 0:r.text)||Object(i.__)("Add to cart",'woocommerce')),N=C?"button":"a",x={};return C?x.onClick=function(){v(),w("cart-add-item",{product:c})}:(x.href=a,x.rel="nofollow",x.onClick=function(){w("product-view-link",{product:c})}),Object(u.createElement)(N,n()({"aria-label":h,className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:f,added:E}),disabled:f},x),g)}),O=function(){return Object(u.createElement)("button",{className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};c.default=Object(j.withProductDataContext)((function(t){var c=t.className,e=Object(k.useInnerBlockLayoutContext)().parentClassName,o=Object(k.useProductDataContext)().product;return Object(u.createElement)("div",{className:b()(c,"wp-block-button","wc-block-components-product-button",r()({},"".concat(e,"__product-add-to-cart"),e))},o.id?Object(u.createElement)(w,{product:o}):Object(u.createElement)(O,null))}))},549:function(t,c){}}]);