{"version":3,"file":"Button_theme.LIMYmgc2.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/eNmZ1ghZ6uzoU6d0hyfX/VOZkqp2Cs7vo4TzEZD3W/NavBlendTags.js","https:/framerusercontent.com/modules/ZYCfLwAlVjhY6lKrnvfu/Y6qTWSEnDJo6JWjACbFG/Button_theme.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";export function withNavBlendScope(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,\"data-nav-blend-scope\":\"true\"});});}export function withNavBlendText(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,\"data-nav-blend-text\":\"true\"});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withNavBlendText\":{\"type\":\"reactHoc\",\"name\":\"withNavBlendText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavBlendScope\":{\"type\":\"reactHoc\",\"name\":\"withNavBlendScope\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NavBlendTags.map","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";let currentTheme=\"light\";function getGlobalTheme(){if(typeof window===\"undefined\")return\"light\";const w=window;return w.__framerSiteTheme??currentTheme;}function setGlobalTheme(theme){currentTheme=theme;if(typeof window===\"undefined\")return;const w=window;w.__framerSiteTheme=theme;}function getSystemTheme(){if(typeof window===\"undefined\")return\"light\";return window.matchMedia?.(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\";}function getFramerThemeStyleTag(){if(typeof document===\"undefined\")return null;const styles=Array.from(document.querySelectorAll(\"style\"));return styles.find(style=>style.textContent?.includes(\"prefers-color-scheme\"))??null;}function applyTheme(theme){if(typeof document===\"undefined\")return;setGlobalTheme(theme);const osTheme=getSystemTheme();const styleTag=getFramerThemeStyleTag();if(styleTag){const original=styleTag.dataset.themeToggleOriginal??styleTag.textContent??\"\";if(!styleTag.dataset.themeToggleOriginal){styleTag.dataset.themeToggleOriginal=original;}const forcedMedia=theme===\"dark\"?osTheme:osTheme===\"dark\"?\"light\":\"dark\";styleTag.textContent=original.replace(/prefers-color-scheme:\\s*(light|dark)/g,`prefers-color-scheme: ${forcedMedia}`);}document.body.dataset.framerTheme=theme;document.documentElement.dataset.framerTheme=theme;document.documentElement.style.colorScheme=theme;}export default function ThemeToggle(props){const[theme,setTheme]=React.useState(()=>getGlobalTheme());React.useEffect(()=>{const initialTheme=getGlobalTheme();applyTheme(initialTheme);setTheme(initialTheme);},[]);const toggle=()=>{const next=theme===\"dark\"?\"light\":\"dark\";applyTheme(next);setTheme(next);};return /*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:toggle,\"aria-label\":`Switch to ${theme===\"dark\"?\"light\":\"dark\"} mode`,style:{width:props.size,height:props.size,minWidth:0,minHeight:0,borderRadius:props.radius,background:props.background,border:`1px solid ${props.borderColor}`,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",padding:0,boxSizing:\"border-box\",overflow:\"hidden\",outline:\"none\",pointerEvents:\"auto\",touchAction:\"manipulation\",flexShrink:0},children:/*#__PURE__*/_jsx(\"span\",{style:{fontSize:Math.max(12,props.size*.42),lineHeight:1,userSelect:\"none\"},children:theme===\"dark\"?props.darkGlyph:props.lightGlyph})});}ThemeToggle.defaultProps={size:44,radius:999,background:\"rgba(255,255,255,0.08)\",borderColor:\"rgba(255,255,255,0.16)\",lightGlyph:\"☀\",darkGlyph:\"☾\"};addPropertyControls(ThemeToggle,{lightGlyph:{type:ControlType.String,title:\"Light Fallback\",defaultValue:\"☀\"},darkGlyph:{type:ControlType.String,title:\"Dark Fallback\",defaultValue:\"☾\"},size:{type:ControlType.Number,title:\"Size\",min:0,max:72,step:1,defaultValue:44,displayStepper:true},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:999,step:1,defaultValue:999,displayStepper:true},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(255,255,255,0.08)\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(255,255,255,0.16)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThemeToggle\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button_theme.map"],"mappings":"sMAA4P,SAAgB,EAAiB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAA2B,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,sBAAsB,OAAO,CAAC,CAAG,kBAAhY,IAA8B,ICA2E,SAAS,GAAgB,CAA6D,OAAlD,IAAS,OAAkB,QAAgB,EAAgB,mBAAmB,EAAc,SAAS,EAAe,EAAM,CAAoB,GAAnB,EAAa,EAAgB,IAAS,OAAY,OAAO,IAAM,EAAE,EAAO,EAAE,kBAAkB,EAAO,SAAS,GAAgB,CAA8C,OAAnC,IAAS,OAAkB,QAAe,EAAO,aAAa,+BAA+B,CAAC,QAAQ,OAAO,QAAS,SAAS,GAAwB,CAA0G,OAAtG,OAAO,SAAW,IAAmB,KAAkB,MAAM,KAAK,SAAS,iBAAiB,QAAQ,CAAC,CAAe,KAAK,GAAO,EAAM,aAAa,SAAS,uBAAuB,CAAC,EAAE,KAAM,SAAS,EAAW,EAAM,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,EAAe,EAAM,CAAC,IAAM,EAAQ,GAAgB,CAAO,EAAS,GAAwB,CAAC,GAAG,EAAS,CAAC,IAAM,EAAS,EAAS,QAAQ,qBAAqB,EAAS,aAAa,GAAO,EAAS,QAAQ,sBAAqB,EAAS,QAAQ,oBAAoB,GAAU,IAAM,EAAY,IAAQ,OAAO,EAAQ,IAAU,OAAO,QAAQ,OAAO,EAAS,YAAY,EAAS,QAAQ,wCAAwC,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