import{r as n,d as p,el as c,j as r,aI as u,c as d,q as i,F as x,bU as m,bV as h}from"./index-Cox3ZWL0.js";const g=({value:e})=>{const s=JSON.stringify(e,null,2);return c(e)==="Object"?r.jsx(u,{mode:"json",readOnly:!0,value:s,onChange:()=>{}}):r.jsx(d,{gray:!0,sx:{width:"320px",overflowX:"auto"},children:s})},j=e=>{const s=n.useMemo(()=>Object.entries(e).map(()=>[p,g]),[e]),t=n.useMemo(()=>Object.entries(e).map(([a,o])=>[{children:a,sx:{width:"50px",overflowX:"auto"}},{value:o}]),[e]);return n.useMemo(()=>[s,t],[s,t])},f=({tag:{tags:e,name:s,hasAdditionalRules:t,hasNestedTypes:a}})=>{const[o,l]=j(e);return r.jsxs(i,{mb:"20px",flexDirection:"column",children:[r.jsxs(i,{alignSelf:"flex-end",mb:"8px",children:[r.jsx(d,{gray:!0,mr:"3px",children:"from"}),r.jsx(p,{primary:!0,children:s})]}),r.jsx(x,{sx:{borderRightStyle:"solid",borderRightWidth:"1px",borderLeftStyle:"solid",borderLeftWidth:"1px",borderColor:"grayShade2",table:{td:{pl:"10px !important",pr:"14px !important",whiteSpace:"nowrap"}}},children:typeof e=="string"?r.jsx(m,{content:e,language:"json",copyButton:!0}):r.jsx(h,{middleColumn:1,groupComponents:o,groupProps:l})})]})};export{f as S};
