import{r as x,j as s,c as d}from"./index-CUDottTv.js";function v({data:n,width:a=120,height:t=32,color:i="var(--color-accent)",className:f}){const c=x.useId(),{linePath:m,areaPath:u}=x.useMemo(()=>{if(n.length<2)return{linePath:"",areaPath:""};const l=Math.min(...n),j=Math.max(...n)-l||1,e=2,o=n.map((r,P)=>({x:e+P/(n.length-1)*(a-e*2),y:e+(1-(r-l)/j)*(t-e*2)})),p=`M ${o.map(r=>`${r.x},${r.y}`).join(" L ")}`,$=`${p} L ${o[o.length-1].x},${t} L ${o[0].x},${t} Z`;return{linePath:p,areaPath:$}},[n,a,t]);return n.length<2?null:s.jsxs("svg",{width:"100%",height:t,viewBox:`0 0 ${a} ${t}`,preserveAspectRatio:"none",className:d("block",f),children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:c,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:i,stopOpacity:.3}),s.jsx("stop",{offset:"100%",stopColor:i,stopOpacity:0})]})}),s.jsx("path",{d:u,fill:`url(#${c})`}),s.jsx("path",{d:m,fill:"none",stroke:i,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}export{v as S};
