import{av as u,r as o,i as f,j as r,F as s,f as h,B as g}from"./index-4e7882bc.js";import{u as C,D as v,b as x}from"./GenericForm-05ca4a96.js";import"./mapValues-0f0ec740.js";import"./ContentCopy-9c99a3ec.js";import"./Delete-5ac3f3e4.js";import"./DataGrid-c017cd02.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-9982a278.js";import"./listItemTextClasses-0d3e3a1a.js";import"./ListItemText-1b946f0b.js";import"./ImageViewerModal-8b66f0f6.js";import"./cjs-cef02a75.js";import"./AdmUsuarios-8b1dd2d5.js";import"./NoRowsComponent-94f1c2bb.js";import"./ListItemIcon-95e7eb22.js";import"./Divider-5402fd42.js";import"./PictureAsPdf-e17bf6db.js";import"./MoreVert-215590fc.js";import"./createContainer-bad89460.js";import"./useForm-d513b4be.js";import"./useThemeProps-f08c4918.js";import"./CardContent-a248f2dd.js";import"./Container-23973070.js";import"./api-4cc4473e.js";import"./Avatar-518c4563.js";import"./_commonjs-dynamic-modules-f717653b.js";import"./env-198ff0f3.js";import"./Scheduler-e9c8d403.js";import"./___vite-browser-external_commonjs-proxy-784aa0e6.js";const X=()=>{let{name:t}=u();const{loading:j,data:e,error:a,load:n}=C(t||"",!0),[m,p]=o.useState(!1),[c,i]=o.useState(!0);f();const l=async()=>{n()};if(o.useEffect(()=>{e&&p(!0),i(!1)},[e]),o.useEffect(()=>{i(!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(s,{children:r(o.Suspense,{fallback:r("div",{children:"Cargando..."}),children:r(x,{})})}):r(s,{children:r(o.Suspense,{fallback:r("div",{children:"Cargando..."}),children:r(v,{})})})};export{X as default};
