import{j as e,y as n}from"./vendor-tanstack-BpuysabX.js";import{u as i,S as m,a as x,b as h,c as p,d as u,e as g,f as j,B as v,g as b,h as f,L as N,z as S,i as t,I as l,j as y,k as C}from"./index-CREafGO4.js";import{R as M,a as c}from"./radio-group-B1MsDBBw.js";import"./vendor-radix-DIu41Ss_.js";import"./vendor-recharts-C2XeLr4O.js";import"./vendor-forms-Buh7U8Ay.js";import"./vendor-date-C1t37jsh.js";const w=["completed","running","scheduled","pending","failed","cancelled","cancelling","crashed","paused"];function k(s){return`color-mode-${s}`}const o=({mode:s})=>e.jsxs("div",{className:`flex items-center justify-between gap-2 w-full ${k(s)}`,children:[e.jsx("span",{children:j(s)}),e.jsx("div",{className:"flex items-center gap-1",children:w.map(r=>e.jsx(T,{state:r},r))})]}),T=({state:s})=>{const r={completed:"bg-[var(--state-completed-500)]",running:"bg-[var(--state-running-500)]",scheduled:"bg-[var(--state-scheduled-500)]",pending:"bg-[var(--state-pending-500)]",failed:"bg-[var(--state-failed-500)]",cancelled:"bg-[var(--state-cancelled-500)]",cancelling:"bg-[var(--state-cancelling-500)]",crashed:"bg-[var(--state-crashed-500)]",paused:"bg-[var(--state-paused-500)]"};return e.jsx("span",{className:`w-4 h-4 rounded-full ${r[s]}`})},F=()=>{const{colorMode:s,setColorMode:r,colorModes:d}=i();return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"color-mode-select",children:"Color Mode"}),e.jsxs(m,{value:s,onValueChange:a=>r(a),children:[e.jsx(x,{className:"w-96",id:"color-mode-select",children:e.jsx(h,{placeholder:"Select a color mode",children:e.jsx(o,{mode:s})})}),e.jsx(p,{children:e.jsx(u,{children:d.map(a=>e.jsx(g,{value:a,children:e.jsx(o,{mode:a})},a))})})]})]})},I=({version:s})=>e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(v,{children:e.jsx(b,{children:e.jsx(f,{className:"text-xl font-semibold",children:"Settings"})})}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Version"}),e.jsx("div",{className:"text-xs",children:s})]})]}),L=({settings:s})=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"server-settings",children:"Server Settings"}),e.jsx(N,{id:"server-settings",className:"p-2 rounded-sm",value:JSON.stringify(s,null,2),disabled:!0,hideLineNumbers:!0})]}),G=()=>{const{theme:s,setTheme:r}=S();return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"color-mode-select",children:"Theme"}),e.jsx("div",{className:"space-y-3",children:e.jsxs(M,{value:s,onValueChange:r,className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx(c,{value:"light",id:"light",className:"peer sr-only"}),e.jsxs(t,{htmlFor:"light",className:"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer",children:[e.jsx(l,{id:"Sun",className:"h-6 w-6"}),e.jsx("span",{children:"Light"})]})]}),e.jsxs("div",{children:[e.jsx(c,{value:"dark",id:"dark",className:"peer sr-only"}),e.jsxs(t,{htmlFor:"dark",className:"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer",children:[e.jsx(l,{id:"Moon",className:"h-6 w-6"}),e.jsx("span",{children:"Dark"})]})]}),e.jsxs("div",{children:[e.jsx(c,{value:"system",id:"system",className:"peer sr-only"}),e.jsxs(t,{htmlFor:"system",className:"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer",children:[e.jsx(l,{id:"Monitor",className:"h-6 w-6"}),e.jsx("span",{children:"System"})]})]})]})})]})},V=()=>{const{data:s}=n(y()),{data:r}=n(C());return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(I,{version:r}),e.jsx(G,{}),e.jsx(F,{}),e.jsx(L,{settings:s})]})},J=V;export{J as component};
//# sourceMappingURL=settings-CokikZyq.js.map
