const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./About-CIMFNPGi.js","./index-VJpwYvBU.js","./envs-CRUy-_iG.js","./index-DZ314hCQ.css","./snakeCase-BPMTuOlK.js","./_createCompounder-JrZUBxnL.js","./isObjectLike-CKrHmw-v.js","./Health-BY-XPRlA.js","./useTable-BnWLFbU3.js","./DebouncedInput-Bm_sFuTC.js","./DeviceImage-DAL8fj7m.js","./index-RbRX26AQ.js","./defineProperty-CegpTSss.js","./InfoAlert-5ZrJ0C3a.js","./Table-DrSTNSTO.js","./Duration-2jHbVRFA.js","./TimeAgo-CeXmHrG4.js","./Settings-DJkLsRQz.js","./SettingsList-dKrzLqZS.js","./CheckboxField-CBqKSuiA.js","./InputField-B_6Ee4_m.js","./NumberField-DL6vGGqp.js","./SelectField-BkTP72p-.js","./Tools-xskx-V5_.js","./Bridge-DiysZ3uT.js","./Json-B3uGPKRz.js","./DevConsole-DQuSRed4.js","./TextareaField-SVbSFlbf.js"])))=>i.map(i=>d[i]);
import{u as p,C as b,E as f,G as h,r as o,K as j,b as x,T,ay as E,az as N,Z as $,j as s,J as _,F as y,N as A,M as P,A as w,S as z,$ as l}from"./index-VJpwYvBU.js";import"./envs-CRUy-_iG.js";const S=o.lazy(async()=>await l(()=>import("./About-CIMFNPGi.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),L=o.lazy(async()=>await l(()=>import("./Health-BY-XPRlA.js"),__vite__mapDeps([7,1,2,3,8,9,10,11,12,13,14,15,16]),import.meta.url)),D=o.lazy(async()=>await l(()=>import("./Settings-DJkLsRQz.js"),__vite__mapDeps([17,1,2,3,13,18,19,20,21,22]),import.meta.url)),R=o.lazy(async()=>await l(()=>import("./Tools-xskx-V5_.js"),__vite__mapDeps([23,1,2,3,20,11]),import.meta.url)),V=o.lazy(async()=>await l(()=>import("./Bridge-DiysZ3uT.js"),__vite__mapDeps([24,1,2,3,25]),import.meta.url)),C=o.lazy(async()=>await l(()=>import("./DevConsole-DQuSRed4.js"),__vite__mapDeps([26,1,2,3,20,22,27,13]),import.meta.url));function O(t,n,a){switch(n){case"about":return s.jsx(S,{sourceIdx:t},t);case"health":return s.jsx(L,{sourceIdx:t},t);case"settings":return s.jsx(D,{sourceIdx:t,tab:a??"main"},t);case"tools":return s.jsx(R,{sourceIdx:t},t);case"bridge":return s.jsx(V,{sourceIdx:t},t);case"dev-console":return s.jsx(C,{sourceIdx:t,tab:a??"mqtt"},t)}}const d=({isActive:t})=>t?"menu-active":void 0;function F(){const{t}=p("settings"),n=b(),{sourceIdx:a,tab:i,subTab:r}=f(),[g,c]=h(a);o.useEffect(()=>{!a||!c?n(`/settings/0/${i||"about"}`,{replace:!0}):i?r||(i==="settings"?n(`/settings/${a}/settings/main`,{replace:!0}):i==="dev-console"&&n(`/settings/${a}/dev-console/mqtt`,{replace:!0})):n(`/settings/${a}/about`,{replace:!0})},[a,c,i,r,n]);const v=o.useMemo(()=>[{to:`/settings/${a}/about`,icon:j,title:t(e=>e.about)},{to:`/settings/${a}/health`,icon:x,title:t(e=>e.health)},{to:`/settings/${a}/settings`,icon:T,title:t(e=>e.settings)},{to:`/settings/${a}/tools`,icon:E,title:t(e=>e.tools)},{to:`/settings/${a}/bridge`,icon:N,title:t(e=>e.bridge)},{to:`/settings/${a}/dev-console`,icon:$,title:t(e=>e.dev_console)}],[a,t]),m=s.jsx("div",{className:"menu menu-horizontal flex-1",children:v.map(e=>s.jsx("li",{className:"tooltip tooltip-bottom","data-tip":e.title,children:s.jsxs(_,{to:e.to,className:d,children:[s.jsx(y,{icon:e.icon,size:"lg"}),s.jsx("span",{className:"hidden lg:inline",children:e.title})]})},e.to))});return s.jsxs(s.Fragment,{children:[s.jsx(A,{children:P?s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx("div",{className:"menu menu-horizontal flex-1 pb-0",children:w.map((e,u)=>s.jsx("li",{children:s.jsx(_,{to:`/settings/${u}/${i||"about"}${r?`/${r}`:""}`,className:d,children:s.jsx(z,{idx:u,alwaysShowName:!0})})},e))}),m]}):m}),i&&O(g,i,r)]})}export{F as default};
