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 s=e=>({addConnectionHelpingText:t('You can find your OAuth credentials in <a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://console.developers.google.com/apis/credentials">Google Cloud Console</a>'),componentName:e.componentName.connection,connectionsTypes:[{authCodeEndpoint:{method:"GET",queryParams:{access_type:"offline",client_id:"",response_type:"code",scope:"https://www.googleapis.com/auth/calendar"},url:"https://accounts.google.com/o/oauth2/v2/auth"},encryptKeys:["access_token","refresh_token","client_secret"],label:t("OAuth 2"),refreshTokenUrl:"https://oauth2.googleapis.com/token",tokenEndpoint:{bodyParams:{client_id:"",client_secret:"",grant_type:"authorization_code"},method:"POST",url:"https://oauth2.googleapis.com/token"},type:"oauth2"}],fieldType:"config",id:"connection-id",label:t("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),r=({$:e,e:o})=>{e.setThisComponent(c=>{var a;if(e.util.isConnectionComponent(c))for(const n of c.connectionsTypes)n.type==="oauth2"&&((a=n.authCodeEndpoint)!=null&&a.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{s as c,r as h};
