(self.webpackChunkwebpackWcBlocksFrontendJsonp=self.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[105],{6524:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>y});var n=l(1616),o=l(1609),r=l(851),a=l(2796);l(6625);const s=({className:e="",disabled:t=!1,name:l,permalink:n="",target:a,rel:s,style:c,onClick:i,disabledTagName:d="span",...u})=>{const m=(0,r.A)("wc-block-components-product-name",e),p=d;if(t){const e=u;return(0,o.createElement)(p,{className:m,...e,dangerouslySetInnerHTML:{__html:l}})}return(0,o.createElement)("a",{className:m,href:n,target:a,...u,dangerouslySetInnerHTML:{__html:l},style:c})};var c=l(7277),i=l(4487);l(7128);const d=({children:e,headingLevel:t,elementType:l=`h${t}`,...n})=>(0,o.createElement)(l,{...n},e),u=(0,n.withProductDataContext)((e=>{const{className:t,headingLevel:l=2,showProductLink:n=!0,linkTarget:u,align:m}=e,p=(0,i.p)(e),{parentClassName:y}=(0,a.useInnerBlockLayoutContext)(),{product:g}=(0,a.useProductDataContext)(),{dispatchStoreEvent:v}=(0,c.y)();return g.id?(0,o.createElement)(d,{headingLevel:l,className:(0,r.A)(t,p.className,"wc-block-components-product-title",{[`${y}__product-title`]:y,[`wc-block-components-product-title--align-${m}`]:m}),style:p.style},(0,o.createElement)(s,{disabled:!n,name:g.name,permalink:g.permalink,target:u,onClick:()=>{v("product-view-link",{product:g})}})):(0,o.createElement)(d,{headingLevel:l,className:(0,r.A)(t,p.className,"wc-block-components-product-title",{[`${y}__product-title`]:y,[`wc-block-components-product-title--align-${m}`]:m}),style:p.style})}));let m={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},linkTarget:{type:"string"},productId:{type:"number",default:0}};m={...m,align:{type:"string"}};const p=m,y=(0,n.withFilteredAttributes)(p)(u)},4487:(e,t,l)=>{"use strict";l.d(t,{p:()=>i});var n=l(851),o=l(3993),r=l(1194),a=l(9786);function s(e={}){const t={};return(0,a.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function c(e,t){return e&&t?`has-${(0,r.c)(t)}-${e}`:""}const i=e=>{const t=(e=>{const t=(0,o.isObject)(e)?e:{style:{}};let l=t.style;return(0,o.isString)(l)&&(l=JSON.parse(l)||{}),(0,o.isObject)(l)||(l={}),{...t,style:l}})(e),l=function(e){var t,l,r,a,i,d;const{backgroundColor:u,textColor:m,gradient:p,style:y}=e,g=c("background-color",u),v=c("color",m),f=function(e){if(e)return`has-${e}-gradient-background`}(p),k=f||(null==y||null===(t=y.color)||void 0===t?void 0:t.gradient);return{className:(0,n.A)(v,f,{[g]:!k&&!!g,"has-text-color":m||(null==y||null===(l=y.color)||void 0===l?void 0:l.text),"has-background":u||(null==y||null===(r=y.color)||void 0===r?void 0:r.background)||p||(null==y||null===(a=y.color)||void 0===a?void 0:a.gradient),"has-link-color":(0,o.isObject)(null==y||null===(i=y.elements)||void 0===i?void 0:i.link)?null==y||null===(d=y.elements)||void 0===d||null===(d=d.link)||void 0===d?void 0:d.color:void 0}),style:s({color:(null==y?void 0:y.color)||{}})}}(t),r=function(e){var t;const l=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:l,style:o}=e,r=l?c("border-color",l):"";return(0,n.A)({"has-border-color":!!l||!(null==o||null===(t=o.border)||void 0===t||!t.color),[r]:!!r})}(e),style:s({border:l})}}(t),a=function(e){var t;return{className:void 0,style:s({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}(t),i=(e=>{const t=(0,o.isObject)(e.style.typography)?e.style.typography:{},l=(0,o.isString)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:l,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}}})(t);return{className:(0,n.A)(i.className,l.className,r.className,a.className),style:{...i.style,...l.style,...r.style,...a.style}}}},7128:()=>{},6625:()=>{}}]);