"use strict";(globalThis.webpackChunkwebpackWcBlocksFrontendJsonp=globalThis.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[28],{4765:(t,e,o)=>{o.r(e),o.d(e,{Block:()=>i,default:()=>u});var r=o(4921),n=o(2796),s=o(3754),a=o(7723),c=o(1616),l=o(790);const i=t=>{const{textAlign:e}=t,o=(0,s.p)(t),{product:c}=(0,n.useProductDataContext)(),i=(0,r.A)(o.className,"wc-block-components-product-average-rating",{[`has-text-align-${e}`]:e});return(0,l.jsx)("div",{className:i,style:o.style,children:Number(c.average_rating)>0?c.average_rating:(0,a.__)("No ratings","woocommerce")})},u=(0,c.withProductDataContext)(i)},3754:(t,e,o)=>{o.d(e,{p:()=>i});var r=o(4921),n=o(3993),s=o(7356),a=o(9786);function c(t={}){const e={};return(0,a.getCSSRules)(t,{selector:""}).forEach(t=>{e[t.key]=t.value}),e}function l(t,e){return t&&e?`has-${(0,s.c)(e)}-${t}`:""}const i=t=>{const e=(t=>{const e=(0,n.isObject)(t)?t:{style:{}};let o=e.style;return(0,n.isString)(o)&&(o=JSON.parse(o)||{}),(0,n.isObject)(o)||(o={}),{...e,style:o}})(t),o=function(t){const{backgroundColor:e,textColor:o,gradient:s,style:a}=t,i=l("background-color",e),u=l("color",o),g=function(t){if(t)return`has-${t}-gradient-background`}(s),y=g||a?.color?.gradient;return{className:(0,r.A)(u,g,{[i]:!y&&!!i,"has-text-color":o||a?.color?.text,"has-background":e||a?.color?.background||s||a?.color?.gradient,"has-link-color":(0,n.isObject)(a?.elements?.link)?a?.elements?.link?.color:void 0}),style:c({color:a?.color||{}})}}(e),s=function(t){const e=t.style?.border||{};return{className:function(t){const{borderColor:e,style:o}=t,n=e?l("border-color",e):"";return(0,r.A)({"has-border-color":!!e||!!o?.border?.color,[n]:!!n})}(t),style:c({border:e})}}(e),a=function(t){return{className:void 0,style:c({spacing:t.style?.spacing||{}})}}(e),i=(t=>{const e=(0,n.isObject)(t.style.typography)?t.style.typography:{},o=(0,n.isString)(e.fontFamily)?e.fontFamily:"";return{className:t.fontFamily?`has-${t.fontFamily}-font-family`:o,style:{fontSize:t.fontSize?`var(--wp--preset--font-size--${t.fontSize})`:e.fontSize,fontStyle:e.fontStyle,fontWeight:e.fontWeight,letterSpacing:e.letterSpacing,lineHeight:e.lineHeight,textDecoration:e.textDecoration,textTransform:e.textTransform}}})(e);return{className:(0,r.A)(i.className,o.className,s.className,a.className),style:{...i.style,...o.style,...s.style,...a.style}}}}}]);