const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CUrh6kIn.js","./main-BzPVmAp-.js","./main-DLoYsyAm.css","./index-Djhsc5K4.js","./study-page-D4nenWxt.js","./usePagination-CGdUxo17.js","./Table-kIlrKW-9.js","./addEventListener-CzbSevz3.js","./Dropdown-Clv_Pvnt.js","./index-BZ6Sq__j.js","./index-sAnz6zLe.js","./RedoOutlined-d_QTXv-s.js","./index-SGIbgpRk.js","./index-7u0Bo8e4.js"])))=>i.map(i=>d[i]);
import{r as s,aT as x,j as e,S as b,u as f,ch as c,bB as k}from"./main-BzPVmAp-.js";const j=s.lazy(()=>x(()=>import("./index-CUrh6kIn.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),S=[{key:"kegg",label:"kegg",component:j}],v=({view:o})=>{if(!o)return e.jsx("div",{children:"未知类型"});const n=S.find(i=>i.key===o);if(!n)return e.jsxs("div",{children:["未知类型",o]});const{component:r,key:d,...a}=n;return e.jsx(s.Suspense,{fallback:e.jsx(b,{active:!0}),children:e.jsx(r,{...a})})},{Sider:w,Content:E}=c,_=()=>{const{theme:o}=f(t=>t.user),n=s.useRef(null),[r,d]=s.useState(null),[a,i]=s.useState(null),l=()=>{if(n.current){const t=n.current.getBoundingClientRect().top;i(t),d(window.innerHeight-t)}};s.useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}),[]);const[p,h]=s.useState(!1),[u,g]=s.useState("kegg"),m=[{label:"Databases",key:"databases",children:[{label:"kegg",key:"kegg"},{label:"metacyc",key:"metacyc"}]}],y={overflow:"auto",height:`${r}px`,position:"sticky",insetInlineStart:0,top:`${a}px`,bottom:0,scrollbarWidth:"thin",scrollbarGutter:"stable",boxShadow:"0 1px 4px rgba(0,0,0,0.1)"};return e.jsxs(c,{ref:n,children:[e.jsx(w,{theme:o,style:y,collapsible:!0,collapsed:p,onCollapse:t=>h(t),children:e.jsx(k,{mode:"inline",defaultOpenKeys:["databases"],style:{flex:1,minWidth:0,background:"transparent",border:0},items:m,selectedKeys:[u],onSelect:t=>{console.log(t.key),g(t.key)}})}),e.jsx(c,{style:{},children:e.jsx(E,{style:{padding:"1rem",margin:0},children:e.jsx(v,{view:u})})})]})};export{v as ComponentsRender,_ as default,S as viewMapping};
