import{u as l,r as s,a as h,b as m,j as n}from"./index-BMcVAjQW.js";import{c}from"./createLucideIcon-7qXzago0.js";function v(t){const o=l(),a=s.useRef(void 0);return h(o.stores.location,e=>{const r=e;if(o.options.defaultStructuralSharing){const d=m(a.current,r);return a.current=d,d}return r})}const p=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],w=c("menu",p);const k=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],y=c("moon",k);const g=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],f=c("sun",g),i="pergam-theme";function u(t){document.documentElement.classList.toggle("dark",t==="dark")}function M(){const[t,o]=s.useState("dark");s.useEffect(()=>{const r=window.localStorage.getItem(i)==="light"?"light":"dark";o(r),u(r)},[]);const a=()=>{const e=t==="dark"?"light":"dark";o(e),window.localStorage.setItem(i,e),u(e)};return n.jsxs("button",{type:"button",onClick:a,className:"group relative inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-card/80 text-foreground shadow-sm backdrop-blur-xl transition hover:-translate-y-0.5 hover:border-primary/40","aria-label":t==="dark"?"Aktifkan light mode":"Aktifkan dark mode",children:[n.jsx(f,{className:"absolute h-4 w-4 transition duration-300 group-hover:rotate-12 dark:-translate-y-8 dark:opacity-0"}),n.jsx(y,{className:"absolute h-4 w-4 translate-y-8 opacity-0 transition duration-300 group-hover:-rotate-12 dark:translate-y-0 dark:opacity-100"})]})}export{w as M,M as T,v as u};
