import{i as c}from"./emotion-use-insertion-effect-with-fallbacks.browser.esm-2ce7a1bc.js";import{a as e,F as o,j as p}from"./Tooltip-5ec3092e.js";import{u as C,D as j,C as v}from"./AdmUsuarios-04f3910a.js";import{g as x,u as J}from"./index-50f78195.js";const{Suspense:n,useEffect:t,useState:i}=await c("react"),{Box:D}=await c("@mui/material"),E=()=>{let{name:a}=x();const{loading:S,data:r,error:l,load:d}=C(a||"",!0),[m,u]=i(!1),[f,s]=i(!0);J();const h=async()=>{d()};if(t(()=>{r&&u(!0),s(!1)},[r]),t(()=>{s(!0),a&&h()},[a]),!l)if(f){const g=`Error: No se encontro el componente components/Custom/${a}`;return p(D,{height:"100dvh",children:[e("h3",{children:a}),e("div",{className:"error",children:g})]})}else return m?e(o,{children:e(n,{fallback:e("div",{children:"Cargando..."}),children:e(v,{})})}):e(o,{children:e(n,{fallback:e("div",{children:"Cargando..."}),children:e(j,{})})})};export{E as default};
