import { jsx as n } from "react/jsx-runtime";
import { Component as s } from "react";
import * as t from "@sentry/browser";
import i from "../Alert/index.js";
class m extends s {
  constructor(r) {
    super(r), this.state = { error: null };
  }
  componentDidCatch(r, e) {
    this.setState({ error: r }), t.withScope((o) => {
      o.setExtras(e), t.captureException(r);
    });
  }
  render() {
    return this.state.error ? /* @__PURE__ */ n(i, { type: "error", variant: "icon", children: "Oops! We encountered an error, please try reload this application." }) : this.props.children;
  }
}
export {
  m as default
};
