import{useEffect as c,useState as m}from"react";var n=()=>{let t=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,[s,o]=m(t()),r=e=>{o(e.matches)};return c(()=>{let e=window.matchMedia("(prefers-color-scheme: dark)");return e.addListener(r),()=>e.removeListener(r)},[]),s};export{n as useThemeDetector};
