{"version":3,"file":"CopyEmail.Dbxk3aTK.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/OmkeNgmwUsFEgpxQvifm/G7GUp4XTOxoxNuznq7Y4/CopyEmail.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";const EMAIL=\"ashrita@bettercitieslab.org\";export function withCopyEmailTooltip(Component){return props=>{const[copied,setCopied]=useState(false);const handleClick=async()=>{// Attempt mailto in the same tab/window (no blank tab if it fails)\nwindow.location.href=`mailto:${EMAIL}`;// Copy to clipboard as the guaranteed fallback\ntry{await navigator.clipboard.writeText(EMAIL);}catch(err){const textarea=document.createElement(\"textarea\");textarea.value=EMAIL;textarea.style.position=\"fixed\";textarea.style.opacity=\"0\";document.body.appendChild(textarea);textarea.select();document.execCommand(\"copy\");document.body.removeChild(textarea);}setCopied(true);setTimeout(()=>setCopied(false),1500);};return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",display:\"inline-block\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:\"100%\",left:\"50%\",transform:copied?\"translate(-50%, -8px)\":\"translate(-50%, 0px)\",marginBottom:\"8px\",padding:\"6px 12px\",borderRadius:\"6px\",background:\"#111\",color:\"#fff\",fontSize:\"13px\",fontFamily:\"inherit\",whiteSpace:\"nowrap\",opacity:copied?1:0,pointerEvents:\"none\",transition:\"opacity 0.2s ease, transform 0.2s ease\",zIndex:10},children:\"Email Copied!\"}),/*#__PURE__*/_jsx(Component,{...props,onClick:handleClick,style:{...props.style,cursor:\"pointer\"}})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCopyEmailTooltip\":{\"type\":\"reactHoc\",\"name\":\"withCopyEmailTooltip\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CopyEmail.map"],"mappings":"8IAA+H,SAAgB,EAAqB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,EAAK,EAAQ,EAAY,SAAS,CACjQ,EAAO,SAAS,KAAK,UAAU,IAC/B,GAAG,CAAC,MAAM,EAAU,UAAU,UAAU,CAAK,CAAE,MAAW,CAAC,IAAM,EAAS,SAAS,cAAc,UAAU,EAAE,EAAS,MAAM,EAAM,EAAS,MAAM,SAAS,QAAQ,EAAS,MAAM,QAAQ,IAAI,SAAS,KAAK,YAAY,CAAQ,EAAE,EAAS,OAAO,EAAE,SAAS,YAAY,MAAM,EAAE,SAAS,KAAK,YAAY,CAAQ,CAAE,CAAC,EAAU,EAAI,EAAE,eAAe,EAAU,EAAK,EAAE,IAAI,CAAE,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,cAAc,EAAE,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,OAAO,OAAO,KAAK,MAAM,UAAU,EAAO,wBAAwB,uBAAuB,aAAa,MAAM,QAAQ,WAAW,aAAa,MAAM,WAAW,OAAO,MAAM,OAAO,SAAS,OAAO,WAAW,UAAU,WAAW,SAAS,QAAQ,KAAW,cAAc,OAAO,WAAW,yCAAyC,OAAO,EAAE,EAAE,SAAS,eAAe,CAAC,EAAe,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAY,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAE,uBAF55B,IAA4B,EAAO,EAAM"}