import{j as e}from"./@tanstack-D1KSn3AD.js";import{u as c,S as n,A as x,a as d,g as f,b as u,r,c as h,d as p,ag as g,af as v}from"./index-CrReivPD.js";import{h as j,O as N}from"./@react-router-t1nY6c48.js";import{I as b}from"./InlineAvatar-BwFD1aEI.js";import"./@radix-Mqgm9uyP.js";import"./@reactflow-_jqD65sB.js";function w({children:s,...t}){return e.jsx(j,{className:({isActive:a})=>` ${a?"bg-primary-50 text-theme-text-brand":"hover:bg-neutral-200"} block rounded-md px-4 py-1 text-text-sm font-semibold `,...t,children:s})}function o({items:s}){return e.jsx("nav",{className:"flex w-full flex-col items-center",children:e.jsx("ul",{className:"flex w-full flex-row items-center gap-1 lg:flex-col lg:items-start",children:s.map(t=>e.jsx("li",{className:"lg:w-full",children:e.jsx(w,{end:!0,to:t.href,children:t.name})},t.name))})})}function y(){var l,i,m;const{data:s,isError:t,isPending:a}=c({throwOnError:!0});return a?e.jsx(n,{className:"h-9 w-full"}):t?null:e.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-2",children:[e.jsxs(x,{size:"md",type:"square",children:[e.jsx(d,{src:f(((l=s.body)==null?void 0:l.server_name)||"default")}),e.jsx(u,{size:"md",children:((i=s.body)==null?void 0:i.server_name[0])||"D"})]}),e.jsx("p",{className:"truncate text-text-sm font-semibold",children:(m=s.body)==null?void 0:m.server_name})]})}function S(){function s(){return[{name:"General",href:r.settings.general},{name:"Members",href:r.settings.members},{name:"Repositories",href:r.settings.repositories.overview},{name:"Secrets",href:r.settings.secrets.overview},{name:"Connectors",href:r.settings.connectors.overview},{name:"Notifications",href:r.settings.notifications}]}const t=s();return e.jsx(o,{items:t})}function I(){function s(){return[{name:"Profile",href:r.settings.profile}]}const t=s();return e.jsx(o,{items:t})}function k(){const{data:s,isPending:t,isError:a}=h();return t?e.jsx(n,{className:"h-[70px] w-full"}):a?null:e.jsxs("div",{className:"rounded-md border border-theme-border-moderate bg-theme-surface-primary p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center",children:[e.jsx(p,{className:"h-4 w-4 fill-theme-text-brand"}),e.jsx("p",{className:"ml-2 text-text-sm  font-semibold",children:"Open source"})]}),e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-tertiary",children:["ZenML v",s.version]}),e.jsxs("p",{className:"text-text-sm text-theme-text-tertiary",children:["UI Version ","v0.17.0-rc2"]})]})}function L(){const{data:s}=g();return e.jsxs("div",{className:"layout-container flex flex-col gap-7 pt-5 lg:flex-row lg:px-10",children:[e.jsxs("div",{className:"flex w-[200px] shrink-0 flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Server"}),e.jsx(y,{}),e.jsx(S,{})]}),s?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Account"}),e.jsx(b,{username:v(s)})]}):e.jsx(n,{className:"h-[70px] w-full"}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(I,{})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Version"}),e.jsx(k,{})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(N,{})})]})}export{L as default};
