import{_ as n}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:n('You can find your API key in <a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://www.notion.so/profile/integrations">Notion Integrations</a>'),componentName:e.componentName.connection,connectionsTypes:[{authCodeEndpoint:{method:"GET",queryParams:{client_id:"",response_type:"code"},url:"https://api.notion.com/v1/oauth/authorize"},encryptKeys:["access_token","refresh_token","client_secret"],label:n("OAuth 2"),refreshTokenUrl:"",tokenEndpoint:{bodyParams:{grant_type:"authorization_code"},headers:{Authorization:""},method:"POST",url:"https://api.notion.com/v1/oauth/token"},type:"oauth2"}],fieldType:"config",id:"connection-id",label:n("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),l=({$:e,e:o})=>{e.setThisComponent(a=>{var i;if(e.util.isConnectionComponent(a))for(const t of a.connectionsTypes)t.type==="oauth2"&&((i=t.authCodeEndpoint)!=null&&i.queryParams&&(t.authCodeEndpoint.queryParams.client_id=o.clientId),t.tokenEndpoint.headers&&(t.tokenEndpoint.headers.Authorization=["Basic ",{encryption:"base64_encode",value:`${o.clientId}:${o.clientSecret}`}]))})},s=[{label:n("Title"),value:"title"},{label:n("Content"),value:"content"},{label:n("Icon"),value:"icon"},{label:n("Date"),value:"cover"}];export{r as c,l as h,s as p};
