import{j as t,r as i}from"./vendor-react-wBh_31cN.js";import{C as l,a as c,b as d,c as m}from"./card-DISTA6Ay.js";import{V as p}from"./value-76ihWpF6.js";import{G as o}from"./index-BKr2rJhV.js";import{a as h}from"./vendor-router-D1GqFWiT.js";import{V as u}from"./vendor-icons-BUUmD6ht.js";const x=a=>e=>{const r=h();return t.jsx(a,{location:r,...e})},g="https://www.hopsworks.ai/contact/main";class b extends i.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidUpdate(e){const{location:r}=this.props;r.pathname!==e.location.pathname&&this.setState({error:void 0})}componentDidCatch(e){this.setState({error:e})}render(){const{children:e,title:r,location:f,...s}=this.props,{error:n}=this.state;return n?t.jsxs(l,{...s,children:[r&&t.jsx(c,{children:t.jsx(d,{children:r})}),t.jsxs(m,{className:"flex flex-col items-center justify-center gap-3 py-8",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(u,{className:"size-4 text-quartz-label-orange"}),t.jsxs(p,{children:["Something went wrong while loading ",r||"this card"]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(o,{variant:"outline",size:"sm",className:"border-quartz-label-orange/40 text-quartz-label-orange hover:bg-quartz-label-orange-shade2 hover:text-quartz-label-orange",onClick:()=>window.location.reload(),children:"Reload page"}),t.jsx(o,{variant:"outline",size:"sm",className:"border-quartz-label-orange/40 text-quartz-label-orange hover:bg-quartz-label-orange-shade2 hover:text-quartz-label-orange",onClick:()=>window.open(g,"_blank","noopener,noreferrer"),children:"Contact support"})]})]})]}):e}}const N=x(b);export{N as C};
