import*as e from"react";import{RedocExample as a,StoreProvider as c,useOpenapiDocsOptions as l}from"@redocly/openapi-docs";import{ErrorMessage as d,OpenApiComponentWrap as f}from"../styled.elements";import{useStore as E}from"../../hooks/use-store";function g(t){const{descriptionFile:i,pointer:n,options:r,mimeType:p}=t,{store:o,error:m}=E(i),s=l();return o?e.createElement(f,{"data-testid":"openapi-example"},e.createElement(c,{options:{...r,markdocOptions:s.markdocOptions},definition:o.definition},e.createElement(a,{pointer:n,mimeType:p||"application/json"}))):e.createElement(d,null,m)}export{g as OpenApiExample};
