(self.webpackChunkwebpackWcBlocksFrontendJsonp=self.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[5445],{4304:(o,t,e)=>{"use strict";e.r(t),e.d(t,{Block:()=>u,default:()=>d});var n=e(9196),c=e(5736),l=e(7608),s=e.n(l),r=e(2864),i=e(947),a=e(721);e(8094);const u=o=>{const{className:t}=o,e=(0,i.F)(o),{parentClassName:l}=(0,r.useInnerBlockLayoutContext)(),{product:a}=(0,r.useProductDataContext)();if(!a.id)return null;const u=!!a.is_in_stock,d=a.low_stock_remaining,k=a.is_on_backorder;return(0,n.createElement)("div",{className:s()(t,{[`${l}__stock-indicator`]:l,"wc-block-components-product-stock-indicator--in-stock":u,"wc-block-components-product-stock-indicator--out-of-stock":!u,"wc-block-components-product-stock-indicator--low-stock":!!d,"wc-block-components-product-stock-indicator--available-on-backorder":!!k,...o.isDescendantOfAllProducts&&{[e.className]:e.className,"wc-block-components-product-stock-indicator wp-block-woocommerce-product-stock-indicator":!0}}),...o.isDescendantOfAllProducts&&{style:e.style}},(({isInStock:o=!1,isLowStock:t=!1,lowStockAmount:e=null,isOnBackorder:n=!1})=>t&&null!==e?(0,c.sprintf)(/* translators: %d stock amount (number of items in stock for product) */ /* translators: %d stock amount (number of items in stock for product) */
(0,c.__)("%d left in stock","woocommerce"),e):n?(0,c.__)("Available on backorder","woocommerce"):o?(0,c.__)("In stock","woocommerce"):(0,c.__)("Out of stock","woocommerce"))({isInStock:u,isLowStock:!!d,lowStockAmount:d,isOnBackorder:k}))},d=(0,a.withProductDataContext)(u)},947:(o,t,e)=>{"use strict";e.d(t,{F:()=>i});var n=e(7608),c=e.n(n),l=e(6946),s=e(3392),r=e(172);const i=o=>{const t=(o=>{const t=(0,l.isObject)(o)?o:{style:{}};let e=t.style;return(0,l.isString)(e)&&(e=JSON.parse(e)||{}),(0,l.isObject)(e)||(e={}),{...t,style:e}})(o),e=(0,r.vc)(t),n=(0,r.l8)(t),i=(0,r.su)(t),a=(0,s.f)(t);return{className:c()(a.className,e.className,n.className,i.className),style:{...a.style,...e.style,...n.style,...i.style}}}},3392:(o,t,e)=>{"use strict";e.d(t,{f:()=>c});var n=e(6946);const c=o=>{const t=(0,n.isObject)(o.style.typography)?o.style.typography:{},e=(0,n.isString)(t.fontFamily)?t.fontFamily:"";return{className:o.fontFamily?`has-${o.fontFamily}-font-family`:e,style:{fontSize:o.fontSize?`var(--wp--preset--font-size--${o.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}}},172:(o,t,e)=>{"use strict";e.d(t,{l8:()=>d,su:()=>k,vc:()=>u});var n=e(7608),c=e.n(n),l=e(7427),s=e(2289),r=e(6946);function i(o={}){const t={};return(0,s.getCSSRules)(o,{selector:""}).forEach((o=>{t[o.key]=o.value})),t}function a(o,t){return o&&t?`has-${(0,l.o)(t)}-${o}`:""}function u(o){var t,e,n,l,s,u,d;const{backgroundColor:k,textColor:m,gradient:f,style:v}=o,p=a("background-color",k),y=a("color",m),b=function(o){if(o)return`has-${o}-gradient-background`}(f),g=b||(null==v||null===(t=v.color)||void 0===t?void 0:t.gradient);return{className:c()(y,b,{[p]:!g&&!!p,"has-text-color":m||(null==v||null===(e=v.color)||void 0===e?void 0:e.text),"has-background":k||(null==v||null===(n=v.color)||void 0===n?void 0:n.background)||f||(null==v||null===(l=v.color)||void 0===l?void 0:l.gradient),"has-link-color":(0,r.isObject)(null==v||null===(s=v.elements)||void 0===s?void 0:s.link)?null==v||null===(u=v.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:i({color:(null==v?void 0:v.color)||{}})}}function d(o){var t;const e=(null===(t=o.style)||void 0===t?void 0:t.border)||{};return{className:function(o){var t;const{borderColor:e,style:n}=o,l=e?a("border-color",e):"";return c()({"has-border-color":!!e||!(null==n||null===(t=n.border)||void 0===t||!t.color),[l]:!!l})}(o),style:i({border:e})}}function k(o){var t;return{className:void 0,style:i({spacing:(null===(t=o.style)||void 0===t?void 0:t.spacing)||{}})}}},8094:()=>{}}]);