(globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[]).push([[2724],{5206:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var o=s(4921),r=s(415),c=s(1616),a=s(2721),n=s(4715),l=s(7723),i=(s(1129),s(790));const u=({setAttributes:e,parentClassName:t,sku:s,className:r,style:c,prefix:a,suffix:u})=>(0,i.jsxs)("div",{className:(0,o.A)(r,"wp-block-post-terms",{[`${t}__product-sku`]:t}),style:c,children:[(0,i.jsx)(n.RichText,{className:"wc-block-components-product-sku__prefix",tagName:"span",placeholder:(0,l.__)("Prefix","woocommerce"),value:a,onChange:t=>e({prefix:t})}),(0,i.jsxs)("span",{children:[" ",s]}),(0,i.jsx)(n.RichText,{className:"wc-block-components-product-sku__suffix",tagName:"span",placeholder:" "+(0,l.__)("Suffix","woocommerce"),value:u,onChange:t=>e({suffix:t})})]}),f=(0,c.withProductDataContext)((e=>{const{className:t}=e,s=(0,a.p)(e),{parentClassName:c}=(0,r.useInnerBlockLayoutContext)(),{product:n}=(0,r.useProductDataContext)(),f=n.sku;return e.isDescendentOfSingleProductTemplate?(0,i.jsx)(u,{setAttributes:e.setAttributes,parentClassName:c,className:t,sku:(0,l.__)("Product SKU","woocommerce"),prefix:e.prefix,suffix:e.suffix}):f?(0,i.jsx)(u,{setAttributes:e.setAttributes,className:t,parentClassName:c,sku:f,prefix:e.prefix,suffix:e.suffix,...e.isDescendantOfAllProducts&&{className:(0,o.A)(t,"wc-block-components-product-sku wp-block-woocommerce-product-sku",s.className),style:{...s.style}}}):null}))},2721:(e,t,s)=>{"use strict";s.d(t,{p:()=>n});var o=s(4921),r=s(3993),c=s(1605),a=s(3099);const n=e=>{const t=(e=>{const t=(0,r.isObject)(e)?e:{style:{}};let s=t.style;return(0,r.isString)(s)&&(s=JSON.parse(s)||{}),(0,r.isObject)(s)||(s={}),{...t,style:s}})(e),s=(0,a.BK)(t),n=(0,a.aR)(t),l=(0,a.fo)(t),i=(0,c.x)(t);return{className:(0,o.A)(i.className,s.className,n.className,l.className),style:{...i.style,...s.style,...n.style,...l.style}}}},1605:(e,t,s)=>{"use strict";s.d(t,{x:()=>r});var o=s(3993);const r=e=>{const t=(0,o.isObject)(e.style.typography)?e.style.typography:{},s=(0,o.isString)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:s,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}}},3099:(e,t,s)=>{"use strict";s.d(t,{BK:()=>i,aR:()=>u,fo:()=>f});var o=s(4921),r=s(7356),c=s(9786),a=s(3993);function n(e={}){const t={};return(0,c.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function l(e,t){return e&&t?`has-${(0,r.c)(t)}-${e}`:""}function i(e){const{backgroundColor:t,textColor:s,gradient:r,style:c}=e,i=l("background-color",t),u=l("color",s),f=function(e){if(e)return`has-${e}-gradient-background`}(r),p=f||c?.color?.gradient;return{className:(0,o.A)(u,f,{[i]:!p&&!!i,"has-text-color":s||c?.color?.text,"has-background":t||c?.color?.background||r||c?.color?.gradient,"has-link-color":(0,a.isObject)(c?.elements?.link)?c?.elements?.link?.color:void 0}),style:n({color:c?.color||{}})}}function u(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:s}=e,r=t?l("border-color",t):"";return(0,o.A)({"has-border-color":!!t||!!s?.border?.color,[r]:!!r})}(e),style:n({border:t})}}function f(e){return{className:void 0,style:n({spacing:e.style?.spacing||{}})}}},1129:()=>{}}]);