import{r as a,Q as p,e6 as d,j as r,aJ as m,b as l,B as i,e as u,aK as x,bU as h}from"./index-dP1W1_bd.js";const g=({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(l,{gray:!0,sx:{width:"320px",overflowX:"auto"},children:s})},j=e=>{const s=a.useMemo(()=>Object.entries(e).map(()=>[p,g]),[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,c]=j(e);return r.jsxs(i,{mb:"20px",flexDirection:"column",children:[r.jsxs(i,{alignSelf:"flex-end",mb:"8px",children:[r.jsx(l,{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:c})})]})};export{f as S};
