(self.webpackChunkwebpackWcBlocksFrontendJsonp=self.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[345],{2686:(t,o,e)=>{"use strict";e.r(o),e.d(o,{Block:()=>a,default:()=>i});var l=e(1609),n=e(851),s=e(2796),c=e(3249),r=e(1616);e(9644);const a=t=>{const{className:o}=t,e=(0,c.p)(t),{parentClassName:r}=(0,s.useInnerBlockLayoutContext)(),{product:a}=(0,s.useProductDataContext)(),{text:i,class:u}=a.stock_availability;if(!a.id||""===i)return null;const d=a.low_stock_remaining;return(0,l.createElement)("div",{className:(0,n.A)(o,{[`${r}__stock-indicator`]:r,[`wc-block-components-product-stock-indicator--${u}`]:u,"wc-block-components-product-stock-indicator--low-stock":!!d,...t.isDescendantOfAllProducts&&{[e.className]:e.className,"wc-block-components-product-stock-indicator wp-block-woocommerce-product-stock-indicator":!0}}),...t.isDescendantOfAllProducts&&{style:e.style}},i)},i=(0,r.withProductDataContext)(a)},3249:(t,o,e)=>{"use strict";e.d(o,{p:()=>i});var l=e(851),n=e(3993),s=e(1194),c=e(9786);function r(t={}){const o={};return(0,c.getCSSRules)(t,{selector:""}).forEach((t=>{o[t.key]=t.value})),o}function a(t,o){return t&&o?`has-${(0,s.c)(o)}-${t}`:""}const i=t=>{const o=(t=>{const o=(0,n.isObject)(t)?t:{style:{}};let e=o.style;return(0,n.isString)(e)&&(e=JSON.parse(e)||{}),(0,n.isObject)(e)||(e={}),{...o,style:e}})(t),e=function(t){var o,e,s,c,i,u,d;const{backgroundColor:y,textColor:f,gradient:k,style:v}=t,m=a("background-color",y),p=a("color",f),b=function(t){if(t)return`has-${t}-gradient-background`}(k),g=b||(null==v||null===(o=v.color)||void 0===o?void 0:o.gradient);return{className:(0,l.A)(p,b,{[m]:!g&&!!m,"has-text-color":f||(null==v||null===(e=v.color)||void 0===e?void 0:e.text),"has-background":y||(null==v||null===(s=v.color)||void 0===s?void 0:s.background)||k||(null==v||null===(c=v.color)||void 0===c?void 0:c.gradient),"has-link-color":(0,n.isObject)(null==v||null===(i=v.elements)||void 0===i?void 0:i.link)?null==v||null===(u=v.elements)||void 0===u||null===(d=u.link)||void 0===d?void 0:d.color:void 0}),style:r({color:(null==v?void 0:v.color)||{}})}}(o),s=function(t){var o;const e=(null===(o=t.style)||void 0===o?void 0:o.border)||{};return{className:function(t){var o;const{borderColor:e,style:n}=t,s=e?a("border-color",e):"";return(0,l.A)({"has-border-color":!!e||!(null==n||null===(o=n.border)||void 0===o||!o.color),[s]:!!s})}(t),style:r({border:e})}}(o),c=function(t){var o;return{className:void 0,style:r({spacing:(null===(o=t.style)||void 0===o?void 0:o.spacing)||{}})}}(o),i=(t=>{const o=(0,n.isObject)(t.style.typography)?t.style.typography:{},e=(0,n.isString)(o.fontFamily)?o.fontFamily:"";return{className:t.fontFamily?`has-${t.fontFamily}-font-family`:e,style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,lineHeight:o.lineHeight,textDecoration:o.textDecoration,textTransform:o.textTransform}}})(o);return{className:(0,l.A)(i.className,e.className,s.className,c.className),style:{...i.style,...e.style,...s.style,...c.style}}}},9644:()=>{}}]);