import{r as e}from"./markdown-Biq8ujIZ.js";import{n as t}from"./createLucideIcon-dIT_VeEb.js";import{t as n}from"./Card-BjcAXIXn.js";var r=e();function i({icon:e,label:i,value:a,accent:o=`brand`}){return(0,r.jsxs)(n,{className:`flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:t(`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl`,{brand:`bg-brand-50 text-brand-600 dark:bg-brand-500/10 dark:text-brand-300`,green:`bg-accent-500/10 text-accent-600 dark:text-accent-400`,amber:`bg-amber-500/10 text-amber-600 dark:text-amber-400`,violet:`bg-violet-500/10 text-violet-600 dark:text-violet-400`}[o]),children:e}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`p`,{className:`text-2xl font-bold leading-tight text-text`,children:a}),(0,r.jsx)(`p`,{className:`truncate text-xs text-text-muted`,children:i})]})]})}function a({data:e}){let t=Math.max(1,...e.map(e=>e.hours));return(0,r.jsx)(`div`,{className:`flex h-40 items-end justify-between gap-2`,children:e.map((e,n)=>(0,r.jsxs)(`div`,{className:`flex flex-1 flex-col items-center gap-2`,children:[(0,r.jsx)(`div`,{className:`flex w-full flex-1 items-end`,children:(0,r.jsx)(`div`,{className:`w-full rounded-lg bg-gradient-to-t from-brand-500 to-brand-400 transition-all`,style:{height:`${e.hours/t*100}%`,minHeight:e.hours>0?6:2},title:`${e.hours}h`})}),(0,r.jsx)(`span`,{className:`text-xs text-text-muted`,children:e.day})]},n))})}var o=[`#1f47f5`,`#10b981`,`#f59e0b`,`#8b5cf6`,`#ec4899`,`#06b6d4`,`#ef4444`,`#64748b`];function s({data:e,size:t=168,thickness:n=26,centerLabel:i,centerSub:a}){let s=e.filter(e=>e.value>0),c=s.reduce((e,t)=>e+t.value,0)||1,l=(t-n)/2,u=2*Math.PI*l,d=0;return(0,r.jsxs)(`div`,{className:`flex flex-col items-center gap-4 sm:flex-row sm:gap-6`,children:[(0,r.jsxs)(`div`,{className:`relative shrink-0`,style:{width:t,height:t},children:[(0,r.jsxs)(`svg`,{width:t,height:t,className:`-rotate-90`,children:[(0,r.jsx)(`circle`,{cx:t/2,cy:t/2,r:l,fill:`none`,strokeWidth:n,className:`stroke-border`}),s.map((e,i)=>{let a=e.value/c*u,s=(0,r.jsx)(`circle`,{cx:t/2,cy:t/2,r:l,fill:`none`,strokeWidth:n,strokeLinecap:`butt`,stroke:e.color??o[i%o.length],strokeDasharray:`${a} ${u-a}`,strokeDashoffset:-d,className:`transition-all duration-700`},i);return d+=a,s})]}),(i||a)&&(0,r.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-center`,children:[i&&(0,r.jsx)(`p`,{className:`text-xl font-bold text-text`,children:i}),a&&(0,r.jsx)(`p`,{className:`text-[11px] text-text-muted`,children:a})]})]}),(0,r.jsx)(`ul`,{className:`w-full flex-1 space-y-2`,children:s.map((e,t)=>(0,r.jsxs)(`li`,{className:`flex items-center gap-2.5 text-sm`,children:[(0,r.jsx)(`span`,{className:`h-3 w-3 shrink-0 rounded-sm`,style:{backgroundColor:e.color??o[t%o.length]}}),(0,r.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-text`,children:e.label}),(0,r.jsxs)(`span`,{className:`shrink-0 font-medium text-text-muted`,children:[Math.round(e.value/c*100),`%`]})]},t))})]})}function c({activeDays:e}){let n=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];return(0,r.jsx)(`div`,{className:`flex justify-between`,children:e.map((e,i)=>(0,r.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5`,children:[(0,r.jsx)(`div`,{className:t(`flex h-9 w-9 items-center justify-center rounded-full text-xs font-semibold`,e?`bg-gradient-to-br from-orange-400 to-red-500 text-white`:`bg-surface-muted text-text-muted`),children:e?`🔥`:n[i]}),(0,r.jsx)(`span`,{className:`text-[10px] text-text-muted`,children:n[i]})]},i))})}export{a as i,i as n,c as r,s as t};