import{j as s}from"./vendor-query-gNoSRy1B.js";import{k as x,u as h}from"./index-KKtPEXlb.js";import{C as l,a as n,b as c,c as d}from"./card-MQ8QxJhT.js";import{S as u}from"./skeleton-B2q3LzC-.js";import{R as g,B as j,X as v,Y as f,T as p,f as b,g as y}from"./vendor-recharts-DqMNzGhv.js";import"./vendor-react-Bv3FVr6H.js";import"./vendor-ui-B_txYLwR.js";const N={short_term:"var(--color-chart-4)",working:"var(--color-chart-3)",episodic:"var(--color-chart-1)",semantic:"var(--color-chart-2)"};function i({label:t,value:o}){const e=Math.round(o*100);return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:t}),s.jsxs("span",{className:"font-mono font-medium",children:[e,"%"]})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${e}%`}})})]})}function A(){const{data:t,isLoading:o}=x(),{t:e}=h(),r=t!=null&&t.stage_distribution?[{stage:e("evolution.shortTerm"),count:t.stage_distribution.short_term,key:"short_term"},{stage:e("evolution.working"),count:t.stage_distribution.working,key:"working"},{stage:e("evolution.episodic"),count:t.stage_distribution.episodic,key:"episodic"},{stage:e("evolution.semantic"),count:t.stage_distribution.semantic,key:"semantic"}]:[];return s.jsxs("div",{className:"space-y-6 p-6",children:[s.jsx("h1",{className:"font-display text-2xl font-bold",children:e("evolution.title")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs(l,{children:[s.jsx(n,{children:s.jsx(c,{children:e("evolution.brainMetrics")})}),s.jsx(d,{children:o?s.jsx("div",{className:"space-y-4",children:Array.from({length:3}).map((a,m)=>s.jsx(u,{className:"h-10 w-full"},m))}):t?s.jsxs("div",{className:"space-y-4",children:[s.jsx(i,{label:e("evolution.maturity"),value:t.maturity_level}),s.jsx(i,{label:e("evolution.plasticity"),value:t.plasticity}),s.jsx(i,{label:e("evolution.semanticRatio"),value:t.semantic_ratio}),s.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-muted-foreground",children:e("evolution.totalFibers")}),s.jsx("p",{className:"font-mono text-lg font-bold",children:t.total_fibers.toLocaleString()})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-muted-foreground",children:e("evolution.totalNeurons")}),s.jsx("p",{className:"font-mono text-lg font-bold",children:t.total_neurons.toLocaleString()})]})]})]}):null})]}),s.jsxs(l,{children:[s.jsx(n,{children:s.jsx(c,{children:e("evolution.stageDistribution")})}),s.jsx(d,{children:o?s.jsx(u,{className:"h-64 w-full"}):s.jsx(g,{width:"100%",height:260,children:s.jsxs(j,{data:r,children:[s.jsx(v,{dataKey:"stage",tick:{fill:"var(--color-muted-foreground)",fontSize:12}}),s.jsx(f,{tick:{fill:"var(--color-muted-foreground)",fontSize:12}}),s.jsx(p,{contentStyle:{backgroundColor:"var(--color-card)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"}}),s.jsx(b,{dataKey:"count",radius:[4,4,0,0],children:r.map(a=>s.jsx(y,{fill:N[a.key]??"var(--color-chart-1)"},a.stage))})]})})})]})]})]})}export{A as default};
