import{_ as o}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const c=n=>({addConnectionHelpingText:o("You can find credentials from ")+`<a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://marketplace.zoom.us/">${o("Here")}</a>`,componentName:n.componentName.connection,connectionsTypes:[{authCodeEndpoint:{method:"GET",queryParams:{client_id:"",response_type:"code"},url:"https://zoom.us/oauth/authorize"},encryptKeys:["access_token","refresh_token","client_secret"],label:o("OAuth 2"),refreshTokenUrl:"https://zoom.us/oauth/token",tokenEndpoint:{bodyParams:{client_id:"",client_secret:"",grant_type:"authorization_code"},method:"POST",url:"https://zoom.us/oauth/token"},type:"oauth2"}],fieldType:"config",id:"connection-id",label:o("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),d=({$:n,e})=>{n.setThisComponent(r=>{var i;if(n.util.isConnectionComponent(r))for(const t of r.connectionsTypes)t.type==="oauth2"&&((i=t.authCodeEndpoint)!=null&&i.queryParams&&(t.authCodeEndpoint.queryParams.client_id=e.clientId,"redirectUri"in e&&e.redirectUri?t.authCodeEndpoint.queryParams.redirect_uri=e.redirectUri:delete t.authCodeEndpoint.queryParams.redirect_uri),t.tokenEndpoint.bodyParams&&(t.tokenEndpoint.bodyParams.client_id=e.clientId,t.tokenEndpoint.bodyParams.client_secret=e.clientSecret,"redirectUri"in e&&e.redirectUri?t.tokenEndpoint.bodyParams.redirect_uri=e.redirectUri:delete t.tokenEndpoint.bodyParams.redirect_uri))})};export{c,d as h};
