import{_ as t}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,o){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,o),o)}};const r=e=>({addConnectionHelpingText:t("You can create an OAuth2 app and get credentials from ")+`<a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://marketplace.gohighlevel.com/">${t("GoHighLevel Marketplace")}</a>`,componentName:e.componentName.connection,connectionsTypes:[{authCodeEndpoint:{method:"GET",queryParams:{client_id:"",response_type:"code",scope:"contacts.readonly locations.readonly campaigns.readonly contacts.write locations/tags.readonly locations/tags.write opportunities.readonly opportunities.write users.readonly workflows.readonly forms.readonly"},url:"https://marketplace.gohighlevel.com/oauth/chooselocation"},encryptKeys:["access_token","refresh_token","client_secret"],label:t("OAuth 2"),refreshTokenUrl:"https://services.leadconnectorhq.com/oauth/token",tokenEndpoint:{bodyParams:{client_id:"",client_secret:"",grant_type:"authorization_code"},method:"POST",url:"https://services.leadconnectorhq.com/oauth/token"},type:"oauth2"}],fieldType:"config",id:"connection-id",label:t("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),s=({$:e,e:o})=>{e.setThisComponent(a=>{var c;if(e.util.isConnectionComponent(a))for(const n of a.connectionsTypes)n.type==="oauth2"&&((c=n.authCodeEndpoint)!=null&&c.queryParams&&(n.authCodeEndpoint.queryParams.client_id=o.clientId),n.tokenEndpoint.bodyParams&&(n.tokenEndpoint.bodyParams.client_id=o.clientId,n.tokenEndpoint.bodyParams.client_secret=o.clientSecret))})};export{r as c,s as h};
