"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[19],{30:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductRating=t.getStars=void 0;const a=r(0),n=(r(1),r(2)),i=r(87),o=s(r(33)),c=r(2),{wrapper:l,wrapperWithZoom:u,wrapperStars:d,wrapperAmmount:p,wrapperAmmountText:h,wrapperAmmountisSrOnly:f}=o.default;function g(e){const t=Math.ceil(2*e)/2,r=[];for(let e=1;e<=5;e++){const s=e<=t?"full":e<=t+.5?"half":"empty";r.push(s)}return r}t.getStars=g,t.ProductRating=function({rating:e,raters:t,size:r="sm",isWithoutZoom:s=!1}){const o=g(e),m=t.toString(),j=(0,c.getPreparedRaters)(m);return(0,a.jsxs)("div",Object.assign({className:s?l:u},{children:[(0,a.jsx)("div",Object.assign({className:d},{children:o.map(((e,t)=>(0,a.jsx)(i.RatingStar,{type:e,size:r},t)))})),(0,a.jsxs)("div",Object.assign({className:p},{children:[(0,a.jsxs)("span",Object.assign({"aria-hidden":"true",className:(0,n.cx)(h,"no-translate")},{children:[" (",j,")"]})),(0,a.jsxs)("p",Object.assign({className:f},{children:["Product Rating: ",e,", with ",j," reviews."]}))]}))]}))}},87:function(e,t,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RatingStar=void 0;const a=r(0),n=(r(1),r(2)),i=s(r(32)),{wrapper:o}=i.default;t.RatingStar=function({type:e,size:t}){return(0,a.jsxs)("svg",Object.assign({className:(0,n.cx)(o,t),width:"16",height:"16",viewBox:"0 0 100 100","aria-hidden":"true"},{children:["half"===e&&(0,a.jsx)("path",{fill:"currentcolor",d:"M51 7l0 69.21-27.17 14.1 4.92-30.3-21.93-21.54 30.72-4.44Z"}),(0,a.jsx)("path",{stroke:"currentcolor","stroke-width":"7",fill:"full"===e?"currentcolor":"none","stroke-linejoin":"round",d:"M50 7l13.76 26.59 30.56 5.06-21.58 21.25 4.68 30.63-27.38-14.32\n -27.17 14.1 4.92-30.3-21.93-21.54 30.72-4.44Z"})]}))}}}]);