import{u as c,e as x,j as e,T as d,S as m,f as p,g as u,h,i as b,N as g,c as n,O as y}from"./index-DXI13nSQ.js";import"./react-Cb2sDjhD.js";const f=[{to:"health",i18nKey:"tabs.health"},{to:"topn",i18nKey:"tabs.topn"},{to:"audit",i18nKey:"tabs.audit"}],j=[1,7,30,90];function N(){const{t}=c("observability"),[r,i]=x(),l=Math.max(1,Number(r.get("days"))||7);function o(s){const a=new URLSearchParams(r);s===7?a.delete("days"):a.set("days",String(s)),i(a,{replace:!0})}return e.jsxs("div",{className:"flex min-h-dvh flex-col bg-bg",children:[e.jsx(d,{}),e.jsx("div",{className:"border-b border-border bg-surface px-3 sm:px-4 py-2",children:e.jsxs("div",{className:"mx-auto flex max-w-7xl items-center gap-3",children:[e.jsx("span",{className:"text-sm text-text-dim shrink-0",children:t("window.label")}),e.jsxs(m,{value:String(l),onValueChange:s=>o(Number(s)),children:[e.jsx(p,{className:"w-32",children:e.jsx(u,{})}),e.jsx(h,{children:j.map(s=>e.jsx(b,{value:String(s),children:t("window.days",{count:s})},s))})]})]})}),e.jsx("nav",{className:n("sticky top-0 z-10","flex items-center gap-1","border-b border-border bg-surface","px-3 sm:px-4 py-1","overflow-x-auto"),"aria-label":t("pageTitle"),children:f.map(s=>e.jsx(g,{to:s.to,className:({isActive:a})=>n("shrink-0 rounded-md px-3 py-1.5 text-sm no-underline","transition-colors tap-target",a?"bg-accent-bg text-accent font-medium":"text-text-dim hover:bg-surface-hover hover:text-text"),children:t(s.i18nKey)},s.to))}),e.jsx("main",{className:"flex-1 px-3 sm:px-4 py-4 pb-safe",children:e.jsx(y,{})})]})}export{N as default};
//# sourceMappingURL=layout-C3e8vPrG.js.map
