import{r as a,j as t,a as c}from"./index-B-YXshIJ.js";import{T as i,a as m,b as x,c as b}from"./TabPanel-CcfErYAk.js";const T=({tabs:e,selectedTabIndex:n=0})=>{const[s,o]=a.useState(n),l=a.useMemo(()=>e.length?e[s].BodyComponent({}):null,[s,e]);return t.jsxs(i,{selectedIndex:s,onSelect:o,className:"mt-4",selectedTabClassName:"border-b-[3px] border-theme-input-highlight text-theme-highlight font-semibold",children:[t.jsx(m,{className:"grid grid-flow-col border-b border-theme-seperator",children:e.map(r=>t.jsx(x,{className:"text-center p-2 cursor-pointer",children:r.title},"tab-".concat(r.key)))}),e.map((r,d)=>t.jsx(b,{children:d===s?l:t.jsx(c,{})},"tabpanel-".concat(r.key)))]})};export{T as D};
