import{aW as u,r as o,G as f,j as r,F as s,o as h,B as g}from"./index-e717fda1.js";import{u as C,D as x,b as j}from"./GenericForm-d890084c.js";import"./ContentCopy-78bb979d.js";import"./ExpandMore-34fba5c7.js";import"./ListItemText-4401e109.js";import"./DialogContentText-37e6a459.js";import"./AdmUsuarios-763413ef.js";import"./Edit-7fdb19fb.js";import"./ListItemIcon-18222df1.js";import"./AdjuntarArchivoSolicitud-d058c9a4.js";import"./QrReader-9e5ccc0e.js";import"./PictureAsPdf-d65f7025.js";import"./main-4ef754b5.js";import"./NoRowsComponent-28b18b21.js";import"./MoreVert-9ee18350.js";import"./useForm-8e9e52cf.js";import"./Card-4256f0c9.js";import"./CardContent-aee299dd.js";import"./cjs-b4f479ad.js";import"./OmegaTransferList-29984757.js";import"./CardHeader-f20ec4a9.js";import"./DatosDom-ca00e8fb.js";import"./ImageViewerModal-480401e7.js";import"./Avatar-fc3ffa39.js";import"./_commonjs-dynamic-modules-585bf2df.js";import"./env-198ff0f3.js";import"./cargaPreferenciasDeUsuario-a0a96312.js";import"./mapValues-bbce004a.js";import"./Scheduler-1eb82049.js";import"./___vite-browser-external_commonjs-proxy-427f54e8.js";const Y=()=>{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{Y as default};
