import{aJ as e}from"./@ui-core-DKdciH1Z.js";import{bH as l,e as n,A as c,f as o,bI as m,h as x,bJ as i,r as t,E as d,bK as f,u,ak as v}from"./index-D7KLAbvI.js";import{O as h}from"./@react-router-DaIuhn3X.js";import"./@reactflow-CJzATMj6.js";import"./@zod-DKyD3xVW.js";import"./@monaco-editor-CSMpaClf.js";function p(){const{data:s,isError:a,isPending:r}=l({throwOnError:!0});return r?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(c,{size:"md",type:"square",children:[e.jsx(o,{src:m(s.body?.server_name||"default")}),e.jsx(x,{size:"md",children:s.body?.server_name[0]||"D"})]}),e.jsx("p",{className:"truncate text-text-sm font-semibold",children:s.body?.server_name})]})}function g(){function s(){return[{name:"General",href:t.settings.general},{name:"Members",href:t.settings.members},{name:"API Tokens",href:t.settings.apiTokens},{name:"Secrets",href:t.settings.secrets.overview,isActiveOverride:r=>r.startsWith(t.settings.secrets.overview)},{name:"Connectors",href:t.settings.connectors.overview,isActiveOverride:r=>r.startsWith(t.settings.connectors.overview)},{name:"Service Accounts",href:t.settings.service_accounts.overview,isActiveOverride:r=>r.startsWith(t.settings.service_accounts.overview)},{name:"MCP",href:t.settings.mcp},{name:"Notifications",href:t.settings.notifications}]}const a=s();return e.jsx(i,{items:a})}function j(){function s(){return[{name:"Profile",href:t.settings.profile}]}const a=s();return e.jsx(i,{items:a})}function b(){const{data:s,isPending:a,isError:r}=d();return a?e.jsx(n,{className:"h-[70px] w-full"}):r?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(f,{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.42.1"]})]})}function _(){const{data:s}=u();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(p,{}),e.jsx(g,{})]}),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(v,{avatarUrl:s.body?.avatar_url??void 0,username:s.name,isServiceAccount:!!s.body?.is_service_account})]}):e.jsx(n,{className:"h-[70px] w-full"}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(j,{})}),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(b,{})]})]}),e.jsx("div",{className:"w-full overflow-x-hidden",children:e.jsx(h,{})})]})}export{_ as default};
