import{aG as u,r as o,w as f,j as r,F as i,l as h,B as g}from"./index-57016b76.js";import{u as C,D as x,a as j}from"./GenericForm-a690ea03.js";import"./ContentCopy-e0134b7d.js";import"./Delete-ba857bbc.js";import"./ListItemText-3dfae1c8.js";import"./ImageViewerModal-a7f3c92e.js";import"./cjs-ea3f05b9.js";import"./AdmUsuarios-d13acbb1.js";import"./Edit-16d4c257.js";import"./ListItemIcon-cdc64cd8.js";import"./Divider-03534251.js";import"./PictureAsPdf-126488ed.js";import"./NoRowsComponent-f6adf5c7.js";import"./MoreVert-da30352a.js";import"./createContainer-80c97b9d.js";import"./useForm-55429ca1.js";import"./useThemeProps-dc4c84f8.js";import"./Card-d0765abf.js";import"./CardContent-ad10b9d8.js";import"./Container-fe1ab53f.js";import"./OmegaTransferList-324e0c3a.js";import"./CardHeader-52227172.js";import"./Avatar-f2a35a83.js";import"./_commonjs-dynamic-modules-9a12d94c.js";import"./env-198ff0f3.js";import"./mapValues-ef9c4214.js";import"./Scheduler-2873f738.js";import"./___vite-browser-external_commonjs-proxy-2173480c.js";const W=()=>{let{name:t}=u();const{loading:v,data:e,error:a,load:n}=C(t||"",!0),[m,p]=o.useState(!1),[c,s]=o.useState(!0);f();const l=async()=>{n()};if(o.useEffect(()=>{e&&p(!0),s(!1)},[e]),o.useEffect(()=>{s(!0),t&&l()},[t]),!a)if(c){const d=`Error: No se encontro el componente components/Custom/${t}`;return h(g,{height:"100dvh",children:[r("h3",{children:t}),r("div",{className:"error",children:d})]})}else return m?r(i,{children:r(o.Suspense,{fallback:r("div",{children:"Cargando..."}),children:r(j,{})})}):r(i,{children:r(o.Suspense,{fallback:r("div",{children:"Cargando..."}),children:r(x,{})})})};export{W as default};
