import{j as e}from"./@radix-B1sy0Lhr.js";import{aU as m,d as n,A as x,e as d,aV as f,f as u,aW as o,r,E as v,aX as h,u as p,a2 as g}from"./index-CO6UN3UX.js";import{O as j}from"./@react-router-CHjLNlgw.js";import"./@tanstack-Dwlisomv.js";import"./@reactflow-gbyyU3kq.js";function b(){var i,l,c;const{data:s,isError:a,isPending:t}=m({throwOnError:!0});return t?e.jsx(n,{className:"h-9 w-full"}):a?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(((i=s.body)==null?void 0:i.server_name)||"default")}),e.jsx(u,{size:"md",children:((l=s.body)==null?void 0:l.server_name[0])||"D"})]}),e.jsx("p",{className:"truncate text-text-sm font-semibold",children:(c=s.body)==null?void 0:c.server_name})]})}function N(){function s(){return[{name:"General",href:r.settings.general},{name:"Members",href:r.settings.members},{name:"API Tokens",href:r.settings.apiTokens},{name:"Secrets",href:r.settings.secrets.overview,isActiveOverride:t=>t.startsWith(r.settings.secrets.overview)},{name:"Connectors",href:r.settings.connectors.overview,isActiveOverride:t=>t.startsWith(r.settings.connectors.overview)},{name:"Service Accounts",href:r.settings.service_accounts.overview,isActiveOverride:t=>t.startsWith(r.settings.service_accounts.overview)},{name:"Notifications",href:r.settings.notifications}]}const a=s();return e.jsx(o,{items:a})}function y(){function s(){return[{name:"Profile",href:r.settings.profile}]}const a=s();return e.jsx(o,{items:a})}function w(){const{data:s,isPending:a,isError:t}=v();return a?e.jsx(n,{className:"h-[70px] w-full"}):t?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(h,{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.35.1"]})]})}function P(){var a,t;const{data:s}=p();return e.jsxs("div",{className:"layout-container flex flex-col gap-7 py-5 lg:flex-row",children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-4 lg:w-[200px]",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(b,{}),e.jsx(N,{})]}),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(g,{avatarUrl:((a=s.body)==null?void 0:a.avatar_url)??void 0,username:s.name,isServiceAccount:!!((t=s.body)!=null&&t.is_service_account)})]}):e.jsx(n,{className:"h-[70px] w-full"}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(y,{})}),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(w,{})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(j,{})})]})}export{P as default};
