import{RedocSchema as p,StoreProvider as l}from"@redocly/openapi-docs";import*as e from"react";import{Admonition as d}from"@redocly/theme/markdoc/components/Admonition/Admonition";import{MarkdownLink as h}from"@redocly/theme/markdoc/components/MarkdownLink/MarkdownLink";import{link as f}from"../../../../../markdoc/nodes/index.js";import{OpenApiComponentWrap as E}from"../styled.elements";const k={nodes:{link:f},components:{MarkdownLink:h}};function S(m){const{options:s,title:t,schemaResolved:o,schemaResolvedErrors:n,schema:r}=m;if(r||o){const i={openapi:"3.0.0",info:{version:"1",description:"test",title:"test"},paths:{},"x-root":o?.components?.schemas?.__root||r,components:{schemas:{...o?.components?.schemas}}};return e.createElement(E,{"data-testid":"json-schema"},t?e.createElement("h3",null,t):null,e.createElement(l,{options:{...s,markdocOptions:k},definition:i},n?.length?e.createElement(d,{name:"Problem in json-schema tag",type:"danger"},n.map((a,c)=>e.createElement("div",{key:c},a))):null,e.createElement(p,{pointer:"#/x-root",disableDeepLinks:!0})))}}export{S as JsonSchema};
