import{I as e,J as t,O as n,P as r,X as i,w as a,x as o}from"./app-CF_tOhgx.js";import{t as s}from"./i18n-DQ8qjn2c.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=n({__name:`ThemeToggle`,setup(n){let c=t(`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,n)=>(e(),a(`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`?(e(),a(`svg`,d,[...n[0]||=[o(`circle`,{cx:`12`,cy:`12`,r:`4`},null,-1),o(`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)]])):(e(),a(`svg`,f,[...n[1]||=[o(`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};