import{e as t}from"./main-few-lands-burn.js";const s=o=>({addConnectionHelpingText:t("You can find credentials from ")+`<a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://console.cloud.google.com/apis/credentials">${t("Here")}</a>`,allowClear:!0,componentName:o.componentName.connection,connectionsTypes:[{authCodeEndpoint:{method:"GET",queryParams:{access_type:"offline",client_id:"",prompt:"consent",response_type:"code",scope:"https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.readonly"},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",verifyConnection:{method:"GET",queryParams:{access_token:"$_access_token_$"},responseMatch:{scope:"https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.readonly"},url:"https://www.googleapis.com/oauth2/v2/tokeninfo"}}],fieldType:"config",id:"connection-id",label:t("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),i=({$:o,e:n})=>{o.setThisComponent(a=>{if(o.util.isConnectionComponent(a))for(const e of a.connectionsTypes)e.type==="oauth2"&&(e.authCodeEndpoint?.queryParams&&(e.authCodeEndpoint.queryParams.client_id=n.clientId),e.tokenEndpoint.bodyParams&&(e.tokenEndpoint.bodyParams.client_id=n.clientId,e.tokenEndpoint.bodyParams.client_secret=n.clientSecret))})};export{s as c,i as h};
