import{C as e,D as t,F as n,N as r,Y as i,b as a,q as o}from"./app-C-5gcHHJ.js";import{t as s}from"./i18n-Cx-jLCWc.js";function c(){let e=location.hostname;if(e===`localhost`||/^[\d.]+$/.test(e))return``;let t=e.split(`.`);return`.`+(t.length>2?t.slice(-2).join(`.`):e)}function l(e){document.documentElement.dataset.theme=e;let t=c();document.cookie=`convoro_theme=${e};path=/;max-age=31536000;samesite=lax`+(t?`;domain=${t}`:``)+(location.protocol===`https:`?`;secure`:``);try{localStorage.setItem(`convoro_theme`,e)}catch{}}var u=[`aria-label`,`title`],d={key:0,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},f={key:1,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},p=t({__name:`ThemeToggle`,setup(t){let c=o(`light`);r(()=>{c.value=document.documentElement.dataset.theme===`dark`?`dark`:`light`});function p(){c.value=c.value===`dark`?`light`:`dark`,l(c.value)}return(t,r)=>(n(),e(`button`,{type:`button`,class:`flex h-[34px] w-[34px] items-center justify-center rounded-full border border-line bg-surface-2 text-ink-2 hover:text-ink`,"aria-label":c.value===`dark`?i(s)(`Switch to light mode`):i(s)(`Switch to dark mode`),title:c.value===`dark`?i(s)(`Light mode`):i(s)(`Dark mode`),onClick:p},[c.value===`dark`?(n(),e(`svg`,d,[...r[0]||=[a(`circle`,{cx:`12`,cy:`12`,r:`4`},null,-1),a(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4`},null,-1)]])):(n(),e(`svg`,f,[...r[1]||=[a(`path`,{d:`M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z`},null,-1)]]))],8,u))}});export{l as n,p as t};