import{aG as u,r as o,w as f,j as r,F as i,l as h,B as g}from"./index-cc84e56a.js";import{u as C,D as x,a as j}from"./GenericForm-b723407d.js";import"./ContentCopy-975c4378.js";import"./Delete-96744410.js";import"./ListItemText-a965cfbd.js";import"./ImageViewerModal-6b52c15d.js";import"./cjs-0b69d496.js";import"./AdmUsuarios-10c7fd6e.js";import"./Edit-5a622c9b.js";import"./ListItemIcon-77037982.js";import"./Divider-b784899a.js";import"./PictureAsPdf-01d63a75.js";import"./NoRowsComponent-73b1b6ea.js";import"./MoreVert-64b91ae9.js";import"./createContainer-a5dd8c1d.js";import"./useForm-48439e2f.js";import"./useThemeProps-34ae68cb.js";import"./Card-ecc10a21.js";import"./CardContent-3949478d.js";import"./Container-56e8d2d4.js";import"./OmegaTransferList-a83f6ea3.js";import"./CardHeader-ce2759f4.js";import"./Avatar-74796535.js";import"./_commonjs-dynamic-modules-334f5ece.js";import"./env-198ff0f3.js";import"./mapValues-ae7c2760.js";import"./Scheduler-d20f7c7d.js";import"./___vite-browser-external_commonjs-proxy-159536b4.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};
