import{o as s,C as i,l as d,n as t,K as o,e as c}from"./Button-1eZ2gOMK.js";const m={role:"group","aria-label":"Tema",class:"flex rounded-full bg-zinc-200/70 p-0.5 dark:bg-zinc-600/50"},g={__name:"ThemeToggler",setup(u){const l=c("light");function n(a){l.value=a,document.documentElement.classList.toggle("dark",a==="dark");try{localStorage.setItem("theme",a)}catch{}}return s(()=>{const e=localStorage.getItem("theme")||"dark";l.value=e,document.documentElement.classList.toggle("dark",e==="dark")}),(a,e)=>(i(),d("div",m,[t("button",{type:"button",class:o(["flex h-8 w-8 items-center justify-center rounded-full text-zinc-600 transition-all dark:text-zinc-400",l.value==="light"?"bg-white text-amber-600 shadow-sm dark:shadow-none":"hover:text-zinc-900 dark:hover:text-zinc-200"]),"aria-label":"Tema claro",onClick:e[0]||(e[0]=r=>n("light"))},[...e[2]||(e[2]=[t("svg",{class:"h-4 w-4",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",fill:"currentColor"})],-1)])],2),t("button",{type:"button",class:o(["flex h-8 w-8 items-center justify-center rounded-full text-zinc-600 transition-all dark:text-zinc-400",l.value==="dark"?"bg-zinc-700 text-zinc-100 shadow-sm":"hover:text-zinc-900 dark:hover:text-zinc-200"]),"aria-label":"Tema escuro",onClick:e[1]||(e[1]=r=>n("dark"))},[...e[3]||(e[3]=[t("svg",{class:"h-4 w-4",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[t("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z",fill:"currentColor"})],-1)])],2)]))}};export{g as _};
