import{r as i,m as u,o as r,R as t,B as g,T as o,ai as s,u as m,b as p}from"./rpcWorker-CVTx5FIM.js";import{A as d}from"./Arcs-BHxqO6AV.js";import{R as E,a as f}from"./Report-Cfa35jgu.js";const k=i.lazy(()=>import("./ErrorMessageStackTraceDialog-BmncAfrP.js").then(function(e){return e.E})),b=u()(e=>({loading:{backgroundColor:e.palette.background.default,backgroundImage:`repeating-linear-gradient(45deg, transparent, transparent 5px, ${e.palette.action.disabledBackground} 5px, ${e.palette.action.disabledBackground} 10px)`,position:"absolute",bottom:0,height:50,width:300,right:0,pointerEvents:"none",textAlign:"center"}})),x=r(function({model:e,children:a}){const{error:n,regionTooLarge:l}=e;return n?t.createElement(g,{message:`${n}`,severity:"error",action:t.createElement(t.Fragment,null,t.createElement(o,{title:"Reload"},t.createElement(s,{"data-testid":"reload_button",onClick:()=>{e.reload()}},t.createElement(E,null))),t.createElement(o,{title:"Show stack trace"},t.createElement(s,{onClick:()=>{m.getSession(e).queueDialog(c=>[k,{onClose:c,error:e.error}])}},t.createElement(f,null))))}):l?e.regionCannotBeRendered():t.createElement(B,{model:e},a)}),B=r(function({model:e,children:a}){const{loading:n}=e;return t.createElement("div",null,a,n?t.createElement(R,{model:e}):null)}),R=r(function({model:e}){const{classes:a}=b(),{message:n}=e;return t.createElement("div",{className:a.loading},t.createElement(p.LoadingEllipses,{message:n}))}),h=r(function({model:e,exportSVG:a}){return t.createElement(x,{model:e},t.createElement(d,{model:e,exportSVG:a}))});export{h as default};
