1import{n as e,r as t}from"./rolldown-runtime-S-ySWqyJ.js";import{i as n,r}from"./framework-CXnKph_e.js";import{t as i}from"./translation-copy-DvF6lQ9u.js";import{t as a}from"./UiIcon-DG854dt9.js";import{n as o}from"./spanish-ui-CmpqUieW.js";var s=e({default:()=>m}),c=t(n(),1),l=r(),u=[{id:`loch`,label:`Loch`},{id:`moss`,label:`Moss`},{id:`brass`,label:`Brass`},{id:`heather`,label:`Heather`},{id:`stone`,label:`Stone`},{id:`crimson`,label:`Crimson`}],d={loch:`See`,moss:`Moos`,brass:`Messing`,heather:`Heide`,stone:`Stein`,crimson:`Karminrot`},f={loch:`Lago`,moss:`Musgo`,brass:`Latón`,heather:`Brezo`,stone:`Piedra`,crimson:`CarmesÃ`},p={loch:`Jezioro`,moss:`Mech`,brass:`MosiÄ
dz`,heather:`Wrzos`,stone:`KamieÅ`,crimson:`Karmazyn`};function m({hideTrigger:e=!1,locale:t=`en`,open:n,onOpenChange:r}){let[s,m]=(0,c.useState)(!1),h=n??s,g=(0,c.useCallback)(e=>{n===void 0&&m(e),r?.(e)},[n,r]),[_,v]=(0,c.useState)(()=>typeof document>`u`?`loch`:document.documentElement.dataset.theme||`loch`),[y,b]=(0,c.useState)(()=>typeof document>`u`?`auto`:document.documentElement.dataset.modePreference||`auto`),x=(0,c.useRef)(null),S=(0,c.useCallback)(()=>{v(document.documentElement.dataset.theme||`loch`),b(document.documentElement.dataset.modePreference||`auto`),g(!0)},[g]);(0,c.useEffect)(()=>{let e=document.documentElement,t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>{e.dataset.theme=_,e.dataset.modePreference=y,e.dataset.mode=y===`auto`?t.matches?`dark`:`light`:y;let n=document.querySelector(`meta[name="theme-color"]`);n&&(n.content=getComputedStyle(e).getPropertyValue(`--surface`).trim())};n(),y===`auto`&&t.addEventListener(`change`,n);try{localStorage.setItem(`cs-theme`,_),localStorage.setItem(`cs-mode`,y)}catch{}return()=>{y===`auto`&&t.removeEventListener(`change`,n)}},[_,y]),(0,c.useEffect)(()=>{if(!h)return;let e=e=>e.key===`Escape`&&g(!1),t=e=>{!x.current?.contains(e.target)&&!e.target.closest?.(`.palette-tool,.appearance-trigger`)&&g(!1)},n=window.setTimeout(()=>document.addEventListener(`pointerdown`,t),0);return document.addEventListener(`keydown`,e),()=>{window.clearTimeout(n),document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[h,g]),(0,c.useEffect)(()=>(window.addEventListener(`cs:open-appearance`,S),()=>window.removeEventListener(`cs:open-appearance`,S)),[S]);let C=t===`pl`,w=t===`de`,T=(e,n,r)=>t===`es`?o(e):C?n:w?r:e;return(0,l.jsxs)(l.Fragment,{children:[i(!e&&(0,l.jsxs)(`button`,{className:`appearance-trigger`,onClick:S,"aria-label":i(T(`Open appearance settings`,`Otwórz ustawienia wyglÄ
du`,`Darstellungseinstellungen öffnen`)),"aria-haspopup":`dialog`,children:[(0,l.jsxs)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,children:[(0,l.jsx)(`path`,{d:`M12 3a9 9 0 1 0 0 18h1.2a2.1 2.1 0 0 0 0-4.2h-1a1.5 1.5 0 0 1 0-3h2.3A6.5 6.5 0 0 0 21 7.3C21 4.9 17 3 12 3Z`}),(0,l.jsx)(`circle`,{cx:`7.3`,cy:`10`,r:`1.1`}),(0,l.jsx)(`circle`,{cx:`9`,cy:`6.7`,r:`1.1`}),(0,l.jsx)(`circle`,{cx:`13`,cy:`5.7`,r:`1.1`}),(0,l.jsx)(`circle`,{cx:`16.5`,cy:`7.6`,r:`1.1`})]}),(0,l.jsx)(`span`,{children:i(T(`Appearance`,`WyglÄ
d`,`Darstellung`))})]})),i(h&&(0,l.jsxs)(`section`,{ref:x,className:`appearance-panel appearance-popover`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`appearance-title`,children:[(0,l.jsxs)(`header`,{children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`p`,{children:i(T(`PERSONALISE THE ATLAS`,`DOSTOSUJ WYGLÄD ATLASU`,`ATLAS PERSONALISIEREN`))}),(0,l.jsx)(`h2`,{id:`appearance-title`,children:i(T(`Theme colour`,`Kolor motywu`,`Akzentfarbe`))})]}),(0,l.jsx)(`button`,{onClick:()=>g(!1),"aria-label":i(T(`Close appearance settings`,`Zamknij ustawienia wyglÄ
du`,`Darstellungseinstellungen schlieÃen`)),children:(0,l.jsx)(a,{name:`close`})})]}),(0,l.jsx)(`div`,{className:`theme-grid`,children:i(u.map(e=>(0,l.jsxs)(`button`,{className:_===e.id?`selected`:``,onClick:()=>v(e.id),"aria-pressed":_===e.id,children:[(0,l.jsx)(`span`,{className:`swatch swatch-${e.id}`}),(0,l.jsx)(`strong`,{children:i(t===`es`?f[e.id]:C?p[e.id]:w?d[e.id]:e.label)})]},e.id)))}),(0,l.jsx)(`p`,{className:`mode-label`,children:i(T(`MODE`,`TRYB WYÅWIETLANIA`,`ANZEIGEMODUS`))}),(0,l.jsxs)(`div`,{className:`mode-switch`,children:[(0,l.jsx)(`button`,{className:y===`auto`?`selected`:``,onClick:()=>b(`auto`),"aria-pressed":y===`auto`,children:i(T(`Automatic`,`Automatycznie`,`Automatisch`))}),(0,l.jsx)(`button`,{className:y===`dark`?`selected`:``,onClick:()=>
1b(`dark`),"aria-pressed":y===`dark`,children:i(T(`Dark`,`Ciemny`,`Dunkel`))}),(0,l.jsx)(`button`,{className:y===`light`?`selected`:``,onClick:()=>b(`light`),"aria-pressed":y===`light`,children:i(T(`Light`,`Jasny`,`Hell`))})]})]}))]})}export{s as n,m as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.