"use strict";(globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[]).push([[8553],{9147:(e,t,o)=>{o.r(t),o.d(t,{Block:()=>m,default:()=>y});var r=o(7723),s=o(4921),n=o(415),c=o(371),a=o(1616),l=o(3993),i=o(6427),u=o(790);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,u.jsx)("span",{className:"wc-block-components-product-rating-counter__reviews_count",children:(0,u.jsx)(i.Disabled,{children:(0,u.jsx)("a",{href:"/",children:o})})})},m=e=>{const{textAlign:t,shouldDisplayMockedReviewsWhenProductHasNoReviews:o}=e,r=(0,c.p)(e),{parentClassName:a}=(0,n.useInnerBlockLayoutContext)(),{product:i}=(0,n.useProductDataContext)(),m=(e=>{const t=(0,l.isNumber)(e.review_count)?e.review_count:parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0})(i),y=(0,s.A)(r.className,"wc-block-components-product-rating-counter",{[`${a}__product-rating`]:a,[`has-text-align-${t}`]:t});if(m||o)return(0,u.jsx)("div",{className:y,style:r.style,children:(0,u.jsx)("div",{className:"wc-block-components-product-rating-counter__container",children:(0,u.jsx)(d,{reviews:m})})})},y=(0,a.withProductDataContext)(m)},371:(e,t,o)=>{o.d(t,{p:()=>a});var r=o(4921),s=o(3993),n=o(219),c=o(17);const a=e=>{const t=(e=>{const t=(0,s.isObject)(e)?e:{style:{}};let o=t.style;return(0,s.isString)(o)&&(o=JSON.parse(o)||{}),(0,s.isObject)(o)||(o={}),{...t,style:o}})(e),o=(0,c.BK)(t),a=(0,c.aR)(t),l=(0,c.fo)(t),i=(0,n.x)(t);return{className:(0,r.A)(i.className,o.className,a.className,l.className),style:{...i.style,...o.style,...a.style,...l.style}}}},219:(e,t,o)=>{o.d(t,{x:()=>s});var r=o(3993);const s=e=>{const t=(0,r.isObject)(e.style.typography)?e.style.typography:{},o=(0,r.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}}}},17:(e,t,o)=>{o.d(t,{BK:()=>i,aR:()=>u,fo:()=>d});var r=o(4921),s=o(7356),n=o(9786),c=o(3993);function a(e={}){const t={};return(0,n.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function l(e,t){return e&&t?`has-${(0,s.c)(t)}-${e}`:""}function i(e){const{backgroundColor:t,textColor:o,gradient:s,style:n}=e,i=l("background-color",t),u=l("color",o),d=function(e){if(e)return`has-${e}-gradient-background`}(s),m=d||n?.color?.gradient;return{className:(0,r.A)(u,d,{[i]:!m&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||s||n?.color?.gradient,"has-link-color":(0,c.isObject)(n?.elements?.link)?n?.elements?.link?.color:void 0}),style:a({color:n?.color||{}})}}function u(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:o}=e,s=t?l("border-color",t):"";return(0,r.A)({"has-border-color":!!t||!!o?.border?.color,[s]:!!s})}(e),style:a({border:t})}}function d(e){return{className:void 0,style:a({spacing:e.style?.spacing||{}})}}}}]);