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