{"version":3,"file":"ActiveCampaignForm_1.2EEeMPzQ.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/uEuBUNawu1QzcFH7mTMa/gM3DUuYQpEduAzPNCGma/ActiveCampaignForm_1.js"],"sourcesContent":["// ActiveCampaign form embed component\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ActiveCampaignForm(props){const{formId,subdomain}=props;const containerRef=useRef(null);useEffect(()=>{if(typeof window===\"undefined\"||!formId||!subdomain)return;// Create the form container div\nconst formDiv=document.createElement(\"div\");formDiv.className=`_form_${formId}`;// Clear any existing content and add the form div\nif(containerRef.current){containerRef.current.innerHTML=\"\";containerRef.current.appendChild(formDiv);}// Create and load the script\nconst script=document.createElement(\"script\");script.src=`https://${subdomain}.activehosted.com/f/embed.php?id=${formId}`;script.charset=\"utf-8\";script.async=true;// Add script to document head\ndocument.head.appendChild(script);// Cleanup function\nreturn()=>{if(document.head.contains(script)){document.head.removeChild(script);}};},[formId,subdomain]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",minHeight:\"400px\",position:\"relative\",...props.style}});}addPropertyControls(ActiveCampaignForm,{formId:{type:ControlType.String,title:\"Form ID\",defaultValue:\"225\",placeholder:\"Enter form ID (e.g., 225)\"},subdomain:{type:ControlType.String,title:\"Subdomain\",defaultValue:\"emolifenl\",placeholder:\"Enter subdomain (e.g., emolifenl)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ActiveCampaignForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ActiveCampaignForm_1.map"],"mappings":"+LAIG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,SAAO,aAAW,EAAY,EAAaA,EAAO,KAAK,CAKT,OALU,MAAc,CAAC,GAAU,IAAS,QAAa,CAAC,GAAQ,CAAC,EAAU,OACtL,IAAM,EAAQ,SAAS,cAAc,MAAM,CAAC,EAAQ,UAAU,SAAS,IACpE,EAAa,UAAS,EAAa,QAAQ,UAAU,GAAG,EAAa,QAAQ,YAAY,EAAQ,EACpG,IAAM,EAAO,SAAS,cAAc,SAAS,CAE7C,MAF8C,GAAO,IAAI,WAAW,EAAU,mCAAmC,IAAS,EAAO,QAAQ,QAAQ,EAAO,MAAM,GAC9J,SAAS,KAAK,YAAY,EAAO,KACvB,CAAI,SAAS,KAAK,SAAS,EAAO,EAAE,SAAS,KAAK,YAAY,EAAO,GAAM,CAAC,EAAO,EAAU,CAAC,CAAqB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ,SAAS,WAAW,GAAG,EAAM,MAAM,CAAC,CAAC,sBARxM,IAAoC,IAAoD,CAQkH,EAAoB,EAAmB,CAAC,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,UAAU,aAAa,MAAM,YAAY,4BAA4B,CAAC,UAAU,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,YAAY,YAAY,oCAAoC,CAAC,CAAC"}