import{b as p,u,r as s,j as i,g as d,a as e,B as n}from"./main-gLMaKCvr.js";import{T as a}from"./index-BrNLqRge.js";const j=()=>{const{entity_id:l}=p(),o=u(),[t,x]=s.useState(),[g,r]=s.useState();s.useRef(null);const c=async()=>{r(!0);const m=await e.get(`/study/mining-study/${l}`);x(m.data),r(!1)};return s.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:t&&i.jsx(i.Fragment,{children:t.title})}),i.jsx("div",{children:t&&i.jsxs(i.Fragment,{children:[i.jsx(a,{onClick:async()=>{await e.post(`/study/get-fulltext/${t.entity_id}`)},children:t.pmid}),i.jsx(a,{children:t.pmcid}),i.jsx(a,{children:t.doi}),i.jsx(a,{children:t.entity_name})]})})]}),i.jsxs(d,{gap:"small",wrap:!0,children:[i.jsx(n,{size:"small",color:"cyan",variant:"solid",onClick:async()=>{await e.post("/nlp/init-db")},children:"init db"}),i.jsx(n,{size:"small",color:"cyan",variant:"solid",onClick:async()=>{await e.post(`/nlp/find-entity/${t.entity_id}`)},children:"nlp"}),i.jsx(n,{size:"small",color:"cyan",variant:"solid",onClick:c,children:"Refresh"}),i.jsx(n,{size:"small",color:"cyan",variant:"solid",onClick:()=>o("/mining"),children:"Back"})]})]}),t&&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:t.fulltext})})]})};export{j as default};
