{"version":3,"file":"IsDarkMode.DtKzofld.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","React.useState"],"sources":["https:/framerusercontent.com/modules/ySyhWsrOTt9t9qvQdEws/kNXGG3lIylLp1KDKcgyd/IsDarkMode.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";// Immediately check the system's color scheme before initial render\nconst getInitialColorScheme=()=>{if(typeof window!==\"undefined\"){return window.matchMedia&&window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\";}// Return a default theme or null if window is not defined\nreturn null// or 'light'/'dark' if you want to default to something specific\n;};// Custom hook to manage color scheme state\nconst useSystemColorScheme=()=>{const[colorScheme,setColorScheme]=React.useState(getInitialColorScheme);React.useEffect(()=>{// Ensure window is available before proceeding\nif(typeof window!==\"undefined\"){const mediaQuery=window.matchMedia(\"(prefers-color-scheme: dark)\");const updateColorScheme=e=>{setColorScheme(e.matches?\"dark\":\"light\");};mediaQuery.addListener(updateColorScheme);// Call updateColorScheme initially in case the preference changes before the component mounts\nupdateColorScheme(mediaQuery);return()=>mediaQuery.removeListener(updateColorScheme);}},[]);return colorScheme;};// Override function to switch between light and dark variants\nexport const ResponsiveTheme=props=>{const colorScheme=useSystemColorScheme();return{...props,variant:colorScheme===\"dark\"?\"Dark\":\"Light\"};};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withResponsiveTheme(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ResponsiveTheme(props)});};}withResponsiveTheme.displayName=\"ResponsiveTheme\";\nexport const __FramerMetadata__ = {\"exports\":{\"withResponsiveTheme\":{\"type\":\"reactHoc\",\"name\":\"withResponsiveTheme\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ResponsiveTheme\":{\"type\":\"override\",\"name\":\"ResponsiveTheme\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IsDarkMode.map"],"mappings":"ySAOgS,SAAgB,EAAoB,EAAE,CAAC,MAAO,KAAQ,EAA+BA,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAgB,EAAM,CAAC,CAAC,6BAPta,IAA4B,IAOyN,CAN1R,MAAqC,IAAS,OAC7C,KADiE,EAAO,YAAY,EAAO,WAAW,+BAA+B,CAAC,QAAQ,OAAO,QAGtJ,MAAyB,CAAC,GAAK,CAAC,EAAY,GAAgBC,EAAe,EAAsB,CAEX,OAFY,MAAoB,CAC5H,GAAU,IAAS,OAAY,CAAC,IAAM,EAAW,EAAO,WAAW,+BAA+B,CAAO,EAAkB,GAAG,CAAC,EAAe,EAAE,QAAQ,OAAO,QAAQ,EACzI,OAD4I,EAAW,YAAY,EAAkB,CACnN,EAAkB,EAAW,KAAW,EAAW,eAAe,EAAkB,GAAI,EAAE,CAAC,CAAQ,GACtF,EAAgB,GAAO,CAAC,IAAM,EAAY,GAAsB,CAAC,MAAM,CAAC,GAAG,EAAM,QAAQ,IAAc,OAAO,OAAO,QAAQ,EAA2U,EAAoB,YAAY"}