import { jsx as _jsx } from "react/jsx-runtime";
import { ErrorBoundary } from "react-error-boundary";
export function VertesiaErrorBoundary({ children, fallback }) {
    if (ErrorBoundaryInstance) { // custom error boundary?
        return _jsx(ErrorBoundaryInstance, { fallback: fallback, children: children });
    }
    else {
        return _jsx(ErrorBoundary, { FallbackComponent: fallback, children: children });
    }
}
let ErrorBoundaryInstance = null;
export function setErrorBoundaryComponent(ErrorBoundaryComponent) {
    ErrorBoundaryInstance = ErrorBoundaryComponent;
}
//# sourceMappingURL=VertesiaErrorBoundary.js.map