(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[43],{161:function(e,t,c){"use strict";c.r(t),c.d(t,"Block",(function(){return d}));var n=c(0),a=c(1),r=c(5),s=c.n(r),l=c(30),o=c(24),u=c(88),b=c(48);c(285);const d=e=>{const{className:t,align:c}=e,r=Object(u.a)(e),{parentClassName:b}=Object(o.useInnerBlockLayoutContext)(),{product:d}=Object(o.useProductDataContext)();if(!(d.id&&d.on_sale||e.isDescendentOfSingleProductTemplate))return null;const p="string"==typeof c?`wc-block-components-product-sale-badge--align-${c}`:"";return Object(n.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,p,{[`${b}__product-onsale`]:b},r.className),style:r.style},Object(n.createElement)(l.a,{label:Object(a.__)("Sale","woocommerce"),screenReaderLabel:Object(a.__)("Product on sale","woocommerce")}))};t.default=Object(b.withProductDataContext)(d)},285:function(e,t){},30:function(e,t,c){"use strict";var n=c(0),a=c(5),r=c.n(a);t.a=({label:e,screenReaderLabel:t,wrapperElement:c,wrapperProps:a={}})=>{let s;const l=null!=e,o=null!=t;return!l&&o?(s=c||"span",a={...a,className:r()(a.className,"screen-reader-text")},Object(n.createElement)(s,{...a},t)):(s=c||n.Fragment,l&&o&&e!==t?Object(n.createElement)(s,{...a},Object(n.createElement)("span",{"aria-hidden":"true"},e),Object(n.createElement)("span",{className:"screen-reader-text"},t)):Object(n.createElement)(s,{...a},e))}}}]);