import{jsx as r,jsxs as e,Fragment as n}from"react/jsx-runtime";import{Children as s,Component as i}from"react";import{styled as o}from"../../styled-components.js";const d=o.div`
  padding: 20px;
  color: red;
`;class h extends i{constructor(t){super(t),this.state={error:void 0}}componentDidCatch(t){return this.setState({error:t}),!1}render(){return this.state.error?e(d,{children:[r("h1",{children:"Something went wrong..."}),e("small",{children:[" ",this.state.error.message," "]}),r("p",{children:e("details",{children:[r("summary",{children:"Stack trace"}),r("pre",{children:this.state.error.stack})]})}),typeof __REDOC_VERSION__<"u"?e(n,{children:[e("small",{children:[" References docs version: ",__REDOC_VERSION__]})," ",r("br",{})]}):null,typeof __REDOC_REVISION__<"u"?e("small",{children:[" Commit: ",__REDOC_REVISION__]}):null]}):r(n,{children:s.only(this.props.children)})}}export{h as ErrorBoundary};
