import{au as u,r as o,i as f,j as r,F as s,f as h,B as g}from"./index-7ecf457b.js";import{u as C,D as x,b as j}from"./CustomCard-2df78ba7.js";import"./_hasUnicode-8e92af18.js";import"./ContentCopy-5fea55d8.js";import"./Delete-ccdde0a3.js";import"./DataGrid-3587fdf7.js";import"./toPropertyKey-4015efc6.js";import"./dividerClasses-c3ed4a16.js";import"./listItemTextClasses-1aee403b.js";import"./ListItemText-1297b456.js";import"./ImageViewerModal-0c131c88.js";import"./cjs-ca8cc029.js";import"./AdmUsuarios-1abd694f.js";import"./Divider-859f9096.js";import"./NoRowsComponent-1c8da2c3.js";import"./ListItemIcon-6852b595.js";import"./Loader-593abaf4.js";import"./MoreVert-dbd138df.js";import"./createContainer-f29fb9c0.js";import"./useForm-26d3e0f9.js";import"./useThemeProps-71110af6.js";import"./CardContent-85d1a348.js";import"./Container-74bcd912.js";import"./api-cbc533e6.js";import"./Avatar-11330c7e.js";import"./_commonjs-dynamic-modules-72cef10b.js";import"./env-198ff0f3.js";import"./Scheduler-6934af1e.js";import"./___vite-browser-external_commonjs-proxy-c6974f23.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};
