import{At as e,Dt as t,Lt as n,a as r,b as i,c as a,i as o,jt as s,kt as c,s as l,x as u}from"./chunk.p3hCiSrt.js";import{a as d,i as f,n as p,o as m,r as h,t as g}from"./entry.DnXws2rz.js";import{t as _}from"./chunk.DOwjsMaD.js";var v=n(s(),1),y=e(),b=()=>{let e=c(t),[n,s]=(0,v.useState)(null),b=(0,v.useCallback)(async()=>{try{s((await e.fetch(`/__devtools/api/metadata`,{schema:{response:_}})).data.entities?.length??0)}catch{}},[e]);(0,v.useEffect)(()=>{b()},[b]);let x=(0,v.useMemo)(()=>{let e=[{label:`Dashboard`,icon:(0,y.jsx)(m,{}),href:`/`},{type:`divider`},{label:`Explorer`,icon:(0,y.jsx)(p,{}),href:`/explorer`}];return(n===null||n>0)&&e.push({label:`Database`,icon:(0,y.jsx)(d,{}),href:`/db/erd`}),e.push({label:`Configuration`,icon:(0,y.jsx)(h,{}),href:`/conf/env`},{type:`divider`},{label:`Emails`,icon:(0,y.jsx)(i,{}),href:`/emails`},{label:`SMS`,icon:(0,y.jsx)(f,{}),href:`/sms`},{type:`divider`},{label:`Graph`,icon:(0,y.jsx)(g,{}),href:`/graph`},{label:`Logs`,icon:(0,y.jsx)(u,{}),href:`/logs`}),e},[n]);return(0,y.jsx)(o,{layout:`alt`,appShellMainProps:{style:{display:`flex`,flexDirection:`column`}},footer:(0,y.jsx)(r,{}),navbarFooter:(0,y.jsx)(r,{}),footerHeight:24,headerHeight:60,navbarHeader:()=>(0,y.jsx)(r,{}),sidebarProps:{collapsed:!0,items:x},appBarProps:{items:[{position:`left`,type:`burger`},{position:`left`,element:(0,y.jsx)(l,{actionProps:{variant:`outline`,bd:`1px solid var(--mantine-color-default-border)`}})},{position:`right`,element:(0,y.jsx)(a,{})}]}})};export{b as DevLayout,b as default};