import{j as r}from"./jsx-runtime.D_zvdyIk.js";import{r as o}from"./index.2yJIXLcc.js";const u=({descriptionHtml:t})=>{const[b,n]=o.useState(""),[a,l]=o.useState(!0),[e,s]=o.useState(0),d=b.split("--- split content ---");return o.useEffect(()=>{n(t),l(!1)},[t]),a?r.jsx("h1",{children:"Loading..."}):r.jsxs("div",{children:[r.jsxs("div",{className:"border-b-2 relative border-border dark:border-light flex",children:[r.jsx("button",{onClick:()=>s(0),className:`${e===0?"border-t-2 border-l-2 border-r-2 border-b-0 bg-body dark:bg-darkmode-body border-border dark:border-light translate-y-[2px]":"border-transparent"} cursor-pointer focus:outline-none px-6 rounded-tl-md rounded-tr-md h-12 py-2 border-t-2 border-l-2 border-r-2 border-b-0`,children:"Description"}),d[1]&&r.jsx("button",{onClick:()=>s(1),className:`${e===1?"border-t-2 border-l-2 border-r-2 border-b-0 border-border dark:border-light bg-body dark:bg-darkmode-body translate-y-[2px]":"border-transparent"} cursor-pointer focus:outline-none px-6 rounded-tl-md rounded-tr-md h-12 py-2 border-t-2 border-l-2 border-r-2 border-b-0 ml-8`,children:"More Info"})]}),r.jsxs("div",{className:"border-l-2 border-r-2 border-b-2 border-border dark:border-light rounded-bl-md rounded-br-md p-6",children:[e===0&&r.jsx("div",{className:"space-y-4",dangerouslySetInnerHTML:{__html:d[0]}}),e===1&&d[1]&&r.jsx("div",{className:"space-y-4",dangerouslySetInnerHTML:{__html:d[1]}})]})]})};export{u as default};
