import{r as a,a as g,j as e}from"./main-BzPVmAp-.js";const x=({pathwayId:s="hsa04144"})=>{const[r,i]=a.useState(""),[n,l]=a.useState([]);return a.useEffect(()=>{g.get(`/kegg/kgml/${s}`).then(t=>{i(t.data.image),l(t.data.entries)})},[s]),e.jsx("div",{style:{position:"relative",textAlign:"center"},children:r&&e.jsxs(e.Fragment,{children:[e.jsx("img",{src:r,alt:"KEGG pathway",useMap:"#kgmlmap",style:{border:"1px solid #ddd",maxWidth:"100%"}}),e.jsx("map",{name:"kgmlmap",children:n.map(t=>{const o=t.x-t.width/2,m=t.y-t.height/2,c=t.x+t.width/2,d=t.y+t.height/2;return e.jsx("area",{shape:"rect",coords:`${o},${m},${c},${d}`,href:t.link,target:"_blank",alt:t.label,title:t.label},t.id)})})]})})};export{x as KGMLMap,x as default};
