import{n as e,t}from"./compiler-runtime-BUESly0A.js";import{t as n}from"./link-CQaf6SbN.js";import{n as r}from"./clsx-CIqcJ5es.js";import{i,n as a,r as o,t as s}from"./server-preference-CoQHXgY_.js";import{n as c,t as l}from"./segmented-Bt8lu3H5.js";var u=r(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),d=t(),f=e();function p(){let e=(0,d.c)(13),[t,r]=s(),[p]=a(`rust-sa:density`,`regular`);o(`data-theme`,t),o(`data-density`,p);let h;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,f.jsx)(`header`,{className:`border-b border-hairline`,children:(0,f.jsxs)(`div`,{className:`max-w-4xl mx-auto px-8 h-[var(--topbar-h)] flex items-center gap-3`,children:[(0,f.jsxs)(n,{to:`/`,"aria-label":`back to home`,className:`inline-flex items-center gap-1.5 text-mute hover:text-ink`,children:[(0,f.jsx)(u,{size:16,"aria-hidden":`true`}),(0,f.jsx)(`span`,{className:`font-mono text-xs`,children:`home`})]}),(0,f.jsx)(`span`,{className:`font-mono text-xs text-faint`,children:`·`}),(0,f.jsx)(`span`,{className:`font-mono text-sm font-medium text-ink`,children:`preferences`}),(0,f.jsx)(i,{})]})}),e[0]=h):h=e[0];let g;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,f.jsx)(`h1`,{className:`font-serif text-5xl leading-none tracking-tight font-normal m-0`,children:`Preferences.`}),e[1]=g):g=e[1];let _;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,f.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[g,(0,f.jsxs)(`p`,{className:`font-sans text-base text-mute leading-relaxed max-w-xl`,children:[`Settings persist to`,` `,(0,f.jsx)(`code`,{className:`font-mono text-rust`,children:`~/.config/sa/config.toml`}),`.`]})]}),e[2]=_):_=e[2];let v;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,f.jsx)(`div`,{className:`font-mono text-xs uppercase tracking-widest text-mute`,children:`appearance`}),e[3]=v):v=e[3];let y;e[4]===t?y=e[5]:(y=[t],e[4]=t,e[5]=y);let b;e[6]===r?b=e[7]:(b=e=>{let t=[...e][0];(t===`light`||t===`dark`)&&r(t)},e[6]=r,e[7]=b);let x,S;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,f.jsx)(c,{id:`light`,children:`light`}),S=(0,f.jsx)(c,{id:`dark`,children:`dark`}),e[8]=x,e[9]=S):(x=e[8],S=e[9]);let C;return e[10]!==y||e[11]!==b?(C=(0,f.jsxs)(`div`,{className:`min-h-full bg-bg text-ink overflow-y-auto`,children:[h,(0,f.jsxs)(`main`,{className:`max-w-4xl mx-auto px-8 py-16 flex flex-col gap-12`,children:[_,(0,f.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[v,(0,f.jsx)(m,{label:`theme`,hint:`light is warm-paper, dark inverts the palette.`,control:(0,f.jsxs)(l,{"aria-label":`Theme`,selectedKeys:y,onSelectionChange:b,children:[x,S]})})]})]})]}),e[10]=y,e[11]=b,e[12]=C):C=e[12],C}function m(e){let t=(0,d.c)(12),{label:n,hint:r,control:i}=e,a;t[0]===n?a=t[1]:(a=(0,f.jsx)(`span`,{className:`font-mono text-sm text-ink`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=r&&(0,f.jsx)(`span`,{className:`font-sans text-xs text-mute`,children:r}),t[2]=r,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,f.jsxs)(`div`,{className:`flex flex-col gap-1 min-w-0`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===i?c=t[8]:(c=(0,f.jsx)(`div`,{className:`flex-shrink-0`,children:i}),t[7]=i,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,f.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-4 border-b border-hairline-soft`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}export{p as component};