"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86009],{86009:(e,r,t)=>{t.r(r),t.d(r,{default:()=>T});var n=t(41364),a=t(82686),o=t(25289);let i=e=>({height:e,width:e}),l=e=>{let{size:r,sizeForBreakpoint:t}=e;return t?{[o.MQ.S]:i(t[o.dj.S]),[o.MQ.M]:i(t[o.dj.M]),[o.MQ.L]:i(t[o.dj.L]),[o.MQ.XL]:i(t[o.dj.XL])}:i(r)},d=(e,r)=>({cx:e/2,cy:e/2,fill:"none",r:e/2-r/2,strokeWidth:r}),s=(e,r)=>{let{size:t,sizeForBreakpoint:n}=e,{strokeWidth:a,strokeWidthForBreakpoint:i}=r;return n&&i?{[o.MQ.S]:d(n[o.dj.S],i[o.dj.S]),[o.MQ.M]:d(n[o.dj.M],i[o.dj.M]),[o.MQ.L]:d(n[o.dj.L],i[o.dj.L]),[o.MQ.XL]:d(n[o.dj.XL],i[o.dj.XL])}:d(t,a)},c=(e,r,t)=>{let n=e/2,a=e/2-r/2,o=2*Math.PI*a;return{cx:n,cy:n,fill:"none",r:a,strokeDasharray:o,strokeDashoffset:(100-t)/100*o,strokeWidth:r,transform:"rotate(-90deg) translate(".concat(n,"px, ").concat(n,"px)"),transformOrigin:"bottom"}},m=(e,r,t)=>{let{size:n,sizeForBreakpoint:a}=e,{strokeWidth:i,strokeWidthForBreakpoint:l}=r;return a&&l?{[o.MQ.S]:c(a[o.dj.S],l[o.dj.S],t),[o.MQ.M]:c(a[o.dj.M],l[o.dj.M],t),[o.MQ.L]:c(a[o.dj.L],l[o.dj.L],t),[o.MQ.XL]:c(a[o.dj.XL],l[o.dj.XL],t)}:c(n,i,t)},p={content:{alignItems:"center",display:"flex",justifyContent:"center",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},root:{position:"relative",width:"fit-content"}},u=function(e){let{size:r,sizeForBreakpoint:t,children:a,progress:o,strokeWidth:i,strokeWidthForBreakpoint:d,bgColor:c,color:u}=e,h=r/2,L=r/2-i/2;return(0,n.FD)("div",{css:p.root,"data-component":"CircularProgressBar",children:[(0,n.FD)("svg",{css:l({size:r,sizeForBreakpoint:t}),"data-element":"svg",children:[(0,n.Y)("circle",{css:s({size:r,sizeForBreakpoint:t},{strokeWidth:i,strokeWidthForBreakpoint:d}),stroke:c,cx:h,cy:h,r:L,strokeLinejoin:"round","data-element":"circle"}),(0,n.Y)("circle",{css:m({size:r,sizeForBreakpoint:t},{strokeWidth:i,strokeWidthForBreakpoint:d},o),stroke:u,cx:h,cy:h,r:L,strokeLinecap:"round",strokeLinejoin:"round","data-element":"circle"})]}),!!a&&(0,n.Y)("div",{css:p.content,children:a})]})};var h=t(40539),L=t(68536),f=t(44787);let g={brandPageIcon:{filter:"invert()"},brandPageTitle:{color:h.l.GLOBAL.WHITE},innerElement:{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},label:[f.Il.tertiaryHeadline],root:{display:"flex",justifyContent:"center"},score:[f.Il.primarySubhead],title:[f.Il.secondaryHeadline,{marginBottom:L.E.SIZE_20,[o.MQ.M]:{marginBottom:L.E.SIZE_40}}],wrapper:{display:"grid",gridGap:"1rem",gridTemplateColumns:"repeat(3, 1fr)",[o.MQ.M]:{gridTemplateColumns:"repeat(6, 1fr)"},[o.MQ.XL]:{gridGap:"4rem"}}},M=function(e){let{children:r,progress:t,size:a,sizeForBreakpoint:o,strokeWidth:i,strokeWidthForBreakpoint:l,isBrandPage:d}=e;return(0,n.Y)("div",{css:g.root,"data-component":"ScoreCard",children:(0,n.Y)(u,{progress:t,size:a,sizeForBreakpoint:o,strokeWidth:i,strokeWidthForBreakpoint:l,bgColor:d?h.l.DARK.GRAY_80:h.l.LIGHT.GRAY_20,color:d?h.l.GLOBAL.TEAL:h.l.GLOBAL.ORANGE,"data-element":"CircularProgressBar",children:r})})};var j=t(51616),E=t.n(j),k=t(12115),I=t(33400),y=t(82462);let S={Comfort:y.Ze.CHAIR,Dry:y.Ze.TIRETYPE_SUMMER,Noise:y.Ze.NOISE,Treadwear:y.Ze.TREADWEAR,Wet:y.Ze.DROP,Winter:y.Ze.TIRETYPE_WINTER},C=(0,k.memo)(function(e){let{customInnerElementStyles:r,label:t,value:a,isBrandPage:o}=e;return(0,n.FD)("div",{css:[g.innerElement,r],"data-component":"ScoreCardContent",children:[(0,n.Y)(I.default,{name:S[t],css:o&&g.brandPageIcon,"data-element":"Icon"}),(0,n.Y)("h4",{css:[g.label,o&&g.brandPageTitle],children:t}),(0,n.Y)("p",{css:[g.score,o&&g.brandPageTitle],children:a})]})},(e,r)=>E()(e,r)),T=function(e){let{title:r,ratings:t,size:o=96,strokeWidth:i=5,sizeForBreakpoint:l,strokeWidthForBreakpoint:d,customInnerElementStyles:s,isBrandPage:c,...m}=e;return(0,n.FD)("div",{...m,"data-component":"ScoreCardListing",children:[(0,n.Y)("h3",{css:[g.title,c&&g.brandPageTitle],children:r}),(0,n.Y)("div",{css:g.wrapper,children:t.map((e,r)=>{let{value:t,label:m}=e;return(0,n.Y)(M,{strokeWidth:i,strokeWidthForBreakpoint:d,size:o,sizeForBreakpoint:l,progress:(0,a.qW)(t,5),isBrandPage:c,children:(0,n.Y)(C,{customInnerElementStyles:s,label:m,value:t,isBrandPage:c})},r)})})]})}}}]);