{"version":3,"file":"PopupControl.BalR1jSc.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/yfNKQdua0qRUB55dql6A/lE8nXtO9ibkXPL9slnT8/PopupControl.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";let isPopupClosed=false;let listeners=[];function closePopup(){isPopupClosed=true;sessionStorage.setItem(\"popupClosed\",\"true\");listeners.forEach(listener=>listener(true));}export function withPopupWrapper(Component){return props=>{const[isHidden,setIsHidden]=React.useState(true);React.useEffect(()=>{const closedInSession=sessionStorage.getItem(\"popupClosed\")===\"true\";if(!closedInSession&&!isPopupClosed){setIsHidden(false);}const listener=state=>setIsHidden(state);listeners.push(listener);return()=>{listeners=listeners.filter(l=>l!==listener);};},[]);if(isHidden){return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,display:\"none\"}});}return /*#__PURE__*/_jsx(Component,{...props});};}export function withCloseButton(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,onClick:e=>{if(props.onClick)props.onClick(e);closePopup();},style:{...props.style,cursor:\"pointer\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withPopupWrapper\":{\"type\":\"reactHoc\",\"name\":\"withPopupWrapper\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCloseButton\":{\"type\":\"reactHoc\",\"name\":\"withCloseButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PopupControl.map"],"mappings":"yHAAgH,SAAS,GAAY,CAAC,EAAc,GAAK,eAAe,QAAQ,cAAc,OAAO,CAAC,EAAU,QAAQ,GAAU,EAAS,GAAK,CAAC,CAAE,SAAgB,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAe,GAAK,CAAwX,OAAvX,MAAoB,CAAuB,eAAe,QAAQ,cAAc,GAAG,QAA4B,CAAC,GAAe,EAAY,GAAM,CAAE,IAAM,EAAS,GAAO,EAAY,EAAM,CAA0B,OAAzB,EAAU,KAAK,EAAS,KAAW,CAAC,EAAU,EAAU,OAAO,GAAG,IAAI,EAAS,GAAK,EAAE,CAAC,CAAI,EAA8B,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,OAAO,CAAC,CAAC,CAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,EAAI,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,GAAG,CAAI,EAAM,SAAQ,EAAM,QAAQ,EAAE,CAAC,GAAY,EAAG,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,UAAU,CAAC,CAAC,sBAA16B,IAA4B,CAAI,EAAc,GAAU,EAAU,EAAE"}