import{g as p,c as g,r as t,j as i,F as d,l as e,a as n,B as a}from"./main-BzPVmAp-.js";const h=()=>{const{entity_id:l}=p(),o=g(),[s,x]=t.useState(),[u,r]=t.useState();t.useRef(null);const c=async()=>{r(!0);const m=await n.get(`/study/mining-study/${l}`);x(m.data),r(!1)};return t.useEffect(()=>{c()},[l]),i.jsxs("div",{style:{maxWidth:"1500px",margin:"0 auto",marginTop:"1rem"},children:[i.jsxs(d,{style:{marginBottom:"1rem"},justify:"space-between",align:"center",gap:"small",children:[i.jsxs("div",{children:[i.jsx("div",{children:s&&i.jsx(i.Fragment,{children:s.title})}),i.jsx("div",{children:s&&i.jsxs(i.Fragment,{children:[i.jsx(e,{onClick:async()=>{await n.post(`/study/get-fulltext/${s.entity_id}`)},children:s.pmid}),i.jsx(e,{children:s.pmcid}),i.jsx(e,{children:s.doi}),i.jsx(e,{children:s.entity_name})]})})]}),i.jsxs(d,{gap:"small",wrap:!0,children:[i.jsx(a,{size:"small",color:"cyan",variant:"solid",onClick:async()=>{await n.post("/nlp/init-db")},children:"init db"}),i.jsx(a,{size:"small",color:"cyan",variant:"solid",onClick:async()=>{await n.post(`/nlp/find-entity/${s.entity_id}`)},children:"nlp"}),i.jsx(a,{size:"small",color:"cyan",variant:"solid",onClick:c,children:"Refresh"}),i.jsx(a,{size:"small",color:"cyan",variant:"solid",onClick:()=>o("/mining"),children:"Back"})]})]}),s&&i.jsx(i.Fragment,{children:i.jsx("div",{style:{whiteSpace:"pre-line",lineHeight:"1.8",fontSize:"16px",color:"#333",textAlign:"justify",padding:"8px 0"},children:s.fulltext})})]})};export{h as default};
