import{m as l,o,R as t,aa as c,ab as d,B as g,u,c as p}from"./index-Bm2SqMk3.js";const m=l()(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"}})),E=o(function({model:e}){const{error:a}=e;return t.createElement(c,{message:`${a}`,severity:"error",action:t.createElement(d,{title:"Reload"},t.createElement(g,{"data-testid":"reload_button",onClick:()=>{e.reload()}},"Reload"))})}),k=o(function({model:e,children:a}){const{error:n,regionTooLarge:r}=e;return n?t.createElement(E,{model:e}):r?e.regionCannotBeRendered():t.createElement(b,{model:e},a)}),b=o(function({model:e,children:a}){const{drawn:n,loading:r}=e,i=u.getContainingView(e),s=(e.lastDrawnOffsetPx||0)-i.offsetPx;return t.createElement("div",{"data-testid":`drawn-${n}`},t.createElement("div",{style:{position:"absolute",left:s}},a),s!==0||r?t.createElement(f,{model:e}):null)}),f=o(function({model:e}){const{classes:a}=m(),{message:n}=e;return t.createElement("div",{className:a.loading},t.createElement(p.LoadingEllipses,{message:n}))});export{k as B};
