import{r as t,j as e}from"./react-vendor-xYZnmIII.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";class d extends t.Component{constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,o){}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsx("div",{className:"border-destructive/50 bg-destructive/5 flex min-h-[100px] flex-col items-center justify-center rounded-lg border-2 border-dashed p-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-destructive mb-2 text-sm font-semibold",children:"⚠️ Component Error"}),e.jsx("div",{className:"text-muted-foreground mb-2 text-xs",children:this.props.componentRef?`Component "${this.props.componentRef}" failed to render`:"Dynamic component failed to render"}),this.state.error&&e.jsx("div",{className:"text-destructive mt-2 max-w-md text-xs",children:e.jsxs("details",{className:"cursor-pointer",children:[e.jsx("summary",{className:"font-semibold",children:"Error Details"}),e.jsx("pre",{className:"mt-2 overflow-auto rounded bg-black/5 p-2 text-left text-[10px]",children:this.state.error.message})]})})]})}):this.props.children}}export{d as default};
