const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ThemeContainer-1.0.74-LGT-FhpN.js","./tanstack-1.0.74-aU0azVkW.js","./redux-1.0.74-D8bIc6ki.js","./vendor-1.0.74-CN03Eozo.js","./lib-1.0.74-B5IEqfHg.js","./utils-1.0.74-7xWhx9mc.js","./useTheme-1.0.74-CW3awVDs.js","./index-1.0.74-iJ_9eGZx.js","./CircularProgress-1.0.74-QfwfRJ7i.js","./Typography-1.0.74-B4mhsevh.js","./getThemeProps-1.0.74-DOfDN6_V.js","./useEnhancedEffect-1.0.74-B56M26dS.js","./useTableSettings-1.0.74-DOrceZPc.js","./hooks-1.0.74-NYCTWeI9.js","./useStoreFormSettings-1.0.74-3dBRbl0S.js","./useMetadata-1.0.74--jxfVI7W.js","./useGlobalCode-1.0.74-D0fKEv_n.js","./useAppFunctions-1.0.74-YEA5Kc-A.js","./ThemeProvider-1.0.74-4uzbYYLM.js","./SharedContainer-1.0.74-EDNOiamc.js","./RestApiError-1.0.74-Bb1un17k.js","./DynamicModeEnum-1.0.74-BXuL5kgA.js","./index-1.0.74-DxwH6OqZ.js","./ButtonBase-1.0.74-W6tAH7AI.js","./Portal-1.0.74-BrUPeMX9.js","./iconBase-1.0.74-Cs0vntJu.js","./useRemoveAppFromStore-1.0.74-CJatuZ_l.js","./Languages-1.0.74-DaJcF5OJ.js","./CleanupDetails-1.0.74-CpCDzf3e.js","./useLocaleApp-1.0.74-BAnA1P2j.js","./useLocaleUd-1.0.74-DiRzsyAi.js","./RestApi-1.0.74-5XKxNzpR.js","./useFormDetails-1.0.74-eGZBYCv4.js","./useChartSettings-1.0.74-C6-5LBxk.js","./useBuiltins-1.0.74-D-15qGZw.js","./ConfirmDialog-1.0.74-CXu4CqK2.js","./AdminTheme-1.0.74-BtTaJUu_.js","./Modal-1.0.74-BfLid1bk.js","./useScreenSize-1.0.74-DEibwIMk.js","./useFullScreen-1.0.74-DAWjksdW.js","./Box-1.0.74-DEbuVvGV.js"])))=>i.map(i=>d[i]);
import{_}from"./RestApiError-1.0.74-Bb1un17k.js";import{j as m}from"./tanstack-1.0.74-aU0azVkW.js";import{r as i}from"./redux-1.0.74-D8bIc6ki.js";import{a as x}from"./hooks-1.0.74-NYCTWeI9.js";import{b as h,l as S,bb as g,am as j}from"./lib-1.0.74-B5IEqfHg.js";import{F as E}from"./FallbackSpinner-1.0.74-7h-h2HIM.js";import{g as L}from"./ActionsDml-1.0.74-C175Bq0Y.js";import{u as M,S as T}from"./StoreTypeEnum-1.0.74-BO7CLiE1.js";import"./vendor-1.0.74-CN03Eozo.js";import"./utils-1.0.74-7xWhx9mc.js";import"./Spinner-1.0.74-B63QTBL9.js";import"./Box-1.0.74-DEbuVvGV.js";import"./CircularProgress-1.0.74-QfwfRJ7i.js";import"./Typography-1.0.74-B4mhsevh.js";import"./RestApi-1.0.74-5XKxNzpR.js";import"./index-1.0.74-FmkvObU2.js";const y=r=>{const{prepareAdminStore:s}=M(r,T.ADMIN),[e,d]=i.useState(!1),[n,c]=i.useState("");return{loadAdminMetaData:(o,f,D)=>{L(o,f,!1,function(t){var p,A;const a=t==null?void 0:t.data;if(S.debug("response data",o,f,a),(p=a==null?void 0:a.access)!=null&&p.select&&Array.isArray(a.access.select)&&a.access.select.includes("POST"))s(o,f,a,D===!0)&&d(!0);else{let u="Unauthorized";((A=t==null?void 0:t.data)==null?void 0:A.message)!==void 0&&(u=t.data.message),u+=" - check console for more information",console.error(u),c(u)}},t=>{console.error("error",t),c(t??h.contactSupport)})},metaDataLoaded:e,loadError:n}},P=i.lazy(()=>_(()=>import("./ThemeContainer-1.0.74-LGT-FhpN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url)),C=i.lazy(()=>_(()=>import("./SharedContainer-1.0.74-EDNOiamc.js").then(r=>r.S),__vite__mapDeps([19,20,3,1,2,4,5,13,21,22,8,23,9,11,18,24,25,26,27,28,29,30,31,32,15,6,7,10,33,34,35,36,37,14,38,39,40]),import.meta.url)),J=({dbs:r,tbl:s,appId:e,exploring:d})=>{S.debug(r,s,e);const n=x(),{loadAdminMetaData:c,metaDataLoaded:l,loadError:o}=y(e);return i.useEffect(()=>{l||c(r,s,d===!0)},[r,s]),o!==""?(n(g({error:o})),n(j()),null):l?m.jsx(i.Suspense,{fallback:m.jsx(E,{}),children:m.jsx(P,{appId:e,children:m.jsx(C,{appId:e})})}):m.jsx(E,{})};export{J as default};
