import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{CodeBlockContainer}from"@redocly/theme";import{useExternalExample}from"./useExternalExample";import{ExampleValue}from"./ExampleValue";export function ExternalExample({example:e,mimeType:r,onCopyClick:a}){const l=useExternalExample(e,r);return void 0===l?_jsx("span",{children:"Loading..."}):l instanceof Error?_jsxs(CodeBlockContainer,{children:["Error loading external example: ",_jsx("br",{}),_jsx("a",{className:"token string",href:e.externalValueUrl,target:"_blank",rel:"noopener noreferrer",children:e.externalValueUrl})]}):_jsx(ExampleValue,{value:l,mimeType:r,onCopyClick:a})}
//# sourceMappingURL=ExternalExample.js.map