{"version":3,"file":"IClosed_Event.3Bwu9zO2.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/WY2hDvXAUr0Xdw7aL00m/RQCG6bA5vuGYpPVD0IqW/IClosed_Event.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * iClosed Widget Component\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function IClosed({url,style}){const widgetRef=useRef(null);const scriptRef=useRef(null);useEffect(()=>{// Remove previous script if any\nif(scriptRef.current&&document.body.contains(scriptRef.current)){document.body.removeChild(scriptRef.current);}// Create new script element\nconst script=document.createElement(\"script\");script.src=\"https://app.iclosed.io/assets/widget.js\";script.async=true;document.body.appendChild(script);scriptRef.current=script;// On load, trigger the init\nscript.onload=()=>{if(window.iClosedWidgetInit){window.iClosedWidgetInit();}};// Clean up on unmount\nreturn()=>{if(scriptRef.current&&document.body.contains(scriptRef.current)){document.body.removeChild(scriptRef.current);}};},[url])// re-run when URL changes\n;return /*#__PURE__*/_jsx(\"div\",{ref:widgetRef,className:\"iclosed-widget\",\"data-url\":url,title:\"Orientation\",style:{width:\"100%\",height:\"100%\",...style}});}IClosed.defaultProps={url:\"https://app.iclosed.io/e/bulletproof/orientation\"};addPropertyControls(IClosed,{url:{type:ControlType.String,title:\"iClosed URL\",placeholder:\"Enter widget URL\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IClosed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IClosed_Event.map"],"mappings":"2LAKG,SAAwB,EAAQ,CAAC,MAAI,SAAO,CAAC,IAAM,EAAUA,EAAO,KAAK,CAAO,EAAUA,EAAO,KAAK,CAKxG,OALyG,MAAc,CACrH,EAAU,SAAS,SAAS,KAAK,SAAS,EAAU,QAAQ,EAAE,SAAS,KAAK,YAAY,EAAU,QAAQ,CAC7G,IAAM,EAAO,SAAS,cAAc,SAAS,CAE7C,MAF8C,GAAO,IAAI,0CAA0C,EAAO,MAAM,GAAK,SAAS,KAAK,YAAY,EAAO,CAAC,EAAU,QAAQ,EACzK,EAAO,WAAW,CAAI,EAAO,mBAAmB,EAAO,mBAAmB,MAChE,CAAI,EAAU,SAAS,SAAS,KAAK,SAAS,EAAU,QAAQ,EAAE,SAAS,KAAK,YAAY,EAAU,QAAQ,GAAM,CAAC,EAAI,CAAC,CAC/G,EAAK,MAAM,CAAC,IAAI,EAAU,UAAU,iBAAiB,WAAW,EAAI,MAAM,cAAc,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,GAAG,EAAM,CAAC,CAAC,sBAV/G,IAAoC,IAAoD,CAUyB,EAAQ,aAAa,CAAC,IAAI,mDAAmD,CAAC,EAAoB,EAAQ,CAAC,IAAI,CAAC,KAAK,EAAY,OAAO,MAAM,cAAc,YAAY,mBAAmB,CAAC,CAAC"}