(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[30],{211:function(t,e,n){"use strict";n.r(e),n.d(e,"Block",(function(){return d}));var c=n(0),s=n(1),r=n(4),o=n.n(r),a=n(23),i=n(100),u=n(87),l=n(133),b=n(42),p=n(149);n(263);const d=t=>{const{textAlign:e}=t,{parentClassName:n}=Object(a.useInnerBlockLayoutContext)(),{product:r}=Object(a.useProductDataContext)(),b=(t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0})(r),d=Object(i.a)(t),g=Object(u.a)(t),_=Object(l.a)(t);if(!b)return null;const j={width:b/5*100+"%"},O=Object(s.sprintf)(
/* translators: %f is referring to the average rating value */
Object(s.__)("Rated %f out of 5","woocommerce"),b),m=(t=>{const e=Object(p.a)(t.review_count)?t.review_count:parseInt(t.review_count,10);return Number.isFinite(e)&&e>0?e:0})(r),w={__html:Object(s.sprintf)(
/* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */
Object(s._n)("Rated %1$s out of 5 based on %2$s customer rating","Rated %1$s out of 5 based on %2$s customer ratings",m,"woocommerce"),Object(s.sprintf)('<strong class="rating">%f</strong>',b),Object(s.sprintf)('<span class="rating">%d</span>',m))};return Object(c.createElement)("div",{className:o()(d.className,"wc-block-components-product-rating",{[n+"__product-rating"]:n},{["has-text-align-"+e]:e}),style:{...d.style,...g.style,..._.style}},Object(c.createElement)("div",{className:o()("wc-block-components-product-rating__stars",n+"__product-rating__stars"),role:"img","aria-label":O},Object(c.createElement)("span",{style:j,dangerouslySetInnerHTML:w})))};e.default=Object(b.withProductDataContext)(d)},263:function(t,e){}}]);