import{au as u,r as o,i as f,j as r,F as s,f as h,B as g}from"./index-ca24af84.js";import{u as C,D as x,b as j}from"./CustomCard-ed471f03.js";import"./_hasUnicode-ddaf981e.js";import"./ContentCopy-b55fe92c.js";import"./Delete-2851117c.js";import"./DataGrid-e816acb7.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-fa4eeeba.js";import"./listItemTextClasses-9e4a600e.js";import"./ListItemText-eb0972a7.js";import"./ImageViewerModal-515fd301.js";import"./cjs-8bb62be0.js";import"./AdmUsuarios-43c7c459.js";import"./Divider-21330109.js";import"./NoRowsComponent-10f615cd.js";import"./ListItemIcon-2dd9a578.js";import"./Loader-d02a9406.js";import"./MoreVert-f89677c2.js";import"./createContainer-b0287129.js";import"./useForm-8dad0a2a.js";import"./useThemeProps-95e03d4e.js";import"./CardContent-5a26e0f6.js";import"./Container-30ca10cd.js";import"./api-2d3a9910.js";import"./Avatar-aaf77463.js";import"./_commonjs-dynamic-modules-cdfc6db0.js";import"./env-198ff0f3.js";import"./Scheduler-25474e0a.js";import"./___vite-browser-external_commonjs-proxy-7014dc98.js";const X=()=>{let{name:t}=u();const{loading:v,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(j,{})})}):r(s,{children:r(o.Suspense,{fallback:r("div",{children:"Cargando..."}),children:r(x,{})})})};export{X as default};
