"use strict";(self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[]).push([[8553],{8494:(e,t,o)=>{o.r(t),o.d(t,{Block:()=>v,default:()=>m});var n=o(1609),r=o(7723),l=o(851),s=o(2796),c=o(2150),a=o(1616),i=o(3993),u=o(6427);const d=e=>{const{reviews:t}=e,o=t?(0,r.sprintf)(/* translators: %s is referring to the total of reviews for a product */ /* translators: %s is referring to the total of reviews for a product */
(0,r._n)("(%s customer review)","(%s customer reviews)",t,"woocommerce"),t):(0,r.__)("(X customer reviews)","woocommerce");return(0,n.createElement)("span",{className:"wc-block-components-product-rating-counter__reviews_count"},(0,n.createElement)(u.Disabled,null,(0,n.createElement)("a",{href:"/"},o)))},v=e=>{const{textAlign:t,shouldDisplayMockedReviewsWhenProductHasNoReviews:o}=e,r=(0,c.p)(e),{parentClassName:a}=(0,s.useInnerBlockLayoutContext)(),{product:u}=(0,s.useProductDataContext)(),v=(e=>{const t=(0,i.isNumber)(e.review_count)?e.review_count:parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0})(u),m=(0,l.A)(r.className,"wc-block-components-product-rating-counter",{[`${a}__product-rating`]:a,[`has-text-align-${t}`]:t});if(v||o)return(0,n.createElement)("div",{className:m,style:r.style},(0,n.createElement)("div",{className:"wc-block-components-product-rating-counter__container"},(0,n.createElement)(d,{reviews:v})))},m=(0,a.withProductDataContext)(v)},2150:(e,t,o)=>{o.d(t,{p:()=>c});var n=o(851),r=o(3993),l=o(3924),s=o(104);const c=e=>{const t=(e=>{const t=(0,r.isObject)(e)?e:{style:{}};let o=t.style;return(0,r.isString)(o)&&(o=JSON.parse(o)||{}),(0,r.isObject)(o)||(o={}),{...t,style:o}})(e),o=(0,s.BK)(t),c=(0,s.aR)(t),a=(0,s.fo)(t),i=(0,l.x)(t);return{className:(0,n.A)(i.className,o.className,c.className,a.className),style:{...i.style,...o.style,...c.style,...a.style}}}},3924:(e,t,o)=>{o.d(t,{x:()=>r});var n=o(3993);const r=e=>{const t=(0,n.isObject)(e.style.typography)?e.style.typography:{},o=(0,n.isString)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:o,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}}}},104:(e,t,o)=>{o.d(t,{BK:()=>i,aR:()=>u,fo:()=>d});var n=o(851),r=o(1194),l=o(9786),s=o(3993);function c(e={}){const t={};return(0,l.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function a(e,t){return e&&t?`has-${(0,r.c)(t)}-${e}`:""}function i(e){var t,o,r,l,i,u;const{backgroundColor:d,textColor:v,gradient:m,style:f}=e,y=a("background-color",d),p=a("color",v),g=function(e){if(e)return`has-${e}-gradient-background`}(m),b=g||(null==f||null===(t=f.color)||void 0===t?void 0:t.gradient);return{className:(0,n.A)(p,g,{[y]:!b&&!!y,"has-text-color":v||(null==f||null===(o=f.color)||void 0===o?void 0:o.text),"has-background":d||(null==f||null===(r=f.color)||void 0===r?void 0:r.background)||m||(null==f||null===(l=f.color)||void 0===l?void 0:l.gradient),"has-link-color":(0,s.isObject)(null==f||null===(i=f.elements)||void 0===i?void 0:i.link)?null==f||null===(u=f.elements)||void 0===u||null===(u=u.link)||void 0===u?void 0:u.color:void 0}),style:c({color:(null==f?void 0:f.color)||{}})}}function u(e){var t;const o=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:o,style:r}=e,l=o?a("border-color",o):"";return(0,n.A)({"has-border-color":!!o||!(null==r||null===(t=r.border)||void 0===t||!t.color),[l]:!!l})}(e),style:c({border:o})}}function d(e){var t;return{className:void 0,style:c({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}}}]);