{"version":3,"file":"HighLevelForm.Cm0wph-N.mjs","names":[],"sources":["https:/framerusercontent.com/modules/sQijgWB7T0XhPdUu7WUk/Kn2UtOq95PW1AFyulZXB/HighLevelForm.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * HighLevel (GoHighLevel / LeadConnector) embedded form or survey.\n * Renders the LeadConnector iframe and loads the resize script (form_embed.js),\n * which handles multi-step survey resizing and submit behavior.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 500\n * @framerIntrinsicHeight 847\n */export default function HighLevelForm(props){const{embedType,formId,surveyId,embedName,height,borderRadius}=props;const baseUrl=\"https://get.smarthomelending.com\";const isSurvey=embedType===\"survey\";const widgetId=isSurvey?surveyId:formId;const src=isSurvey?`${baseUrl}/widget/survey/${widgetId}`:`${baseUrl}/widget/form/${widgetId}`;useEffect(()=>{// Load the LeadConnector embed script once (handles resize + submit).\nconst existing=document.querySelector(`script[src=\"${baseUrl}/js/form_embed.js\"]`);if(existing)return;const script=document.createElement(\"script\");script.src=`${baseUrl}/js/form_embed.js`;script.async=true;document.body.appendChild(script);},[]);if(isSurvey){// Multi-step survey: form_embed.js controls the height. scrolling disabled.\nreturn /*#__PURE__*/_jsx(\"iframe\",{src:src,title:embedName,id:widgetId,scrolling:\"no\",style:{display:\"block\",width:\"100%\",minHeight:height,border:\"none\",borderRadius:borderRadius,background:\"transparent\"}});}// Single-page form.\nreturn /*#__PURE__*/_jsx(\"iframe\",{src:src,title:embedName,id:`inline-${widgetId}`,\"data-layout\":\"{'id':'INLINE'}\",\"data-trigger-type\":\"alwaysShow\",\"data-activation-type\":\"alwaysActivated\",\"data-deactivation-type\":\"neverDeactivate\",\"data-form-name\":embedName,\"data-height\":height,\"data-layout-iframe-id\":`inline-${widgetId}`,\"data-form-id\":widgetId,style:{width:\"100%\",height:\"100%\",minHeight:height,border:\"none\",borderRadius:borderRadius,background:\"transparent\"}});}HighLevelForm.defaultProps={embedType:\"survey\",formId:\"4JNPQupE8Y3WyDaiwy3s\",surveyId:\"65Xcbz7FZWznWpwU3zy0\",embedName:\"Website Apply Now Survey\",height:847,borderRadius:24};addPropertyControls(HighLevelForm,{embedType:{type:ControlType.Enum,title:\"Type\",options:[\"survey\",\"form\"],optionTitles:[\"Survey\",\"Form\"],defaultValue:\"survey\"},surveyId:{type:ControlType.String,title:\"Survey ID\",defaultValue:\"65Xcbz7FZWznWpwU3zy0\",hidden:props=>props.embedType!==\"survey\"},formId:{type:ControlType.String,title:\"Form ID\",defaultValue:\"4JNPQupE8Y3WyDaiwy3s\",hidden:props=>props.embedType!==\"form\"},embedName:{type:ControlType.String,title:\"Name\",defaultValue:\"Website Apply Now Survey\"},height:{type:ControlType.Number,title:\"Min Height\",defaultValue:847,min:200,max:2e3,unit:\"px\",step:1},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:24,min:0,max:100,unit:\"px\",step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HighLevelForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"500\",\"framerIntrinsicHeight\":\"847\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HighLevelForm.map"],"mappings":"0KASG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,YAAU,SAAO,WAAS,YAAU,SAAO,gBAAc,EAAY,EAAQ,mCAAyC,EAAS,IAAY,SAAe,EAAS,EAAS,EAAS,EAAa,EAAI,EAAS,GAAG,EAAQ,iBAAiB,IAAW,GAAG,EAAQ,eAAe,IAGtU,OAHiV,MAAc,CAC5Q,GAApE,SAAS,cAAc,eAAe,EAAQ,oBAAgC,EAAE,OAA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