{"version":3,"file":"Theme.CDesdtt4.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/0u432EHr46cl5OIYlwfp/xe2ywOaEYM7o233gI6rK/Theme.js"],"sourcesContent":["/*\n * Theme variant by framer.today\n * v1.0.0\n * https://framer.today/license\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export const withResponsiveTheme=Component=>{return props=>{const[isDarkTheme,setIsDarkTheme]=useState(null);useEffect(()=>{const mediaQuery=window.matchMedia(\"(prefers-color-scheme: dark)\");const updateTheme=()=>{const currentToggleState=localStorage.getItem(\"currentToggleState\");console.log(\"currentToggleState:\",currentToggleState);console.log(\"mediaQuery.matches:\",mediaQuery.matches);setIsDarkTheme(currentToggleState===\"dark\"||currentToggleState===null&&mediaQuery.matches);};const osThemeChange=e=>{const currentToggleState=localStorage.getItem(\"currentToggleState\");console.log(\"OS Theme Change - currentToggleState:\",currentToggleState);console.log(\"OS Theme Change - e.matches:\",e.matches);if(currentToggleState===null){setIsDarkTheme(e.matches);}};updateTheme();window.addEventListener(\"themeChange\",updateTheme);mediaQuery.addEventListener(\"change\",osThemeChange);return()=>{window.removeEventListener(\"themeChange\",updateTheme);mediaQuery.removeEventListener(\"change\",osThemeChange);};},[]);console.log(\"Render - isDarkTheme:\",isDarkTheme);if(isDarkTheme===null){return null;}const variant=isDarkTheme?\"Dark\":\"Light\";return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};};\nexport const __FramerMetadata__ = {\"exports\":{\"withResponsiveTheme\":{\"type\":\"reactHoc\",\"name\":\"withResponsiveTheme\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Theme.map"],"mappings":"8JAI8C,IAAsC,CAAa,EAAoB,GAAmB,GAAO,CAAC,GAAK,CAAC,EAAY,GAAgBA,EAAS,KAAK,CAAk7B,GAAj7B,MAAc,CAAC,IAAM,EAAW,EAAO,WAAW,+BAA+B,CAAO,MAAgB,CAAC,IAAM,EAAmB,aAAa,QAAQ,qBAAqB,CAAC,QAAQ,IAAI,sBAAsB,EAAmB,CAAC,QAAQ,IAAI,sBAAsB,EAAW,QAAQ,CAAC,EAAe,IAAqB,QAAQ,IAAqB,MAAM,EAAW,QAAQ,EAAS,EAAc,GAAG,CAAC,IAAM,EAAmB,aAAa,QAAQ,qBAAqB,CAAC,QAAQ,IAAI,wCAAwC,EAAmB,CAAC,QAAQ,IAAI,+BAA+B,EAAE,QAAQ,CAAI,IAAqB,MAAM,EAAe,EAAE,QAAQ,EAAyH,OAArH,GAAa,CAAC,EAAO,iBAAiB,cAAc,EAAY,CAAC,EAAW,iBAAiB,SAAS,EAAc,KAAW,CAAC,EAAO,oBAAoB,cAAc,EAAY,CAAC,EAAW,oBAAoB,SAAS,EAAc,GAAK,EAAE,CAAC,CAAC,QAAQ,IAAI,wBAAwB,EAAY,CAAI,IAAc,KAAM,OAAO,KAAM,IAAM,EAAQ,EAAY,OAAO,QAAQ,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAc,UAAQ,CAAC"}