import{_ as i}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,n){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,n),n)}};const s=e=>({addConnectionHelpingText:i('You can find credentials from <a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://github.com/settings/tokens">Here</a>'),componentName:e.componentName.connection,connectionsTypes:[{encryptKeys:["value"],label:i("API Key"),showKey:!1,type:"api_key",verifyConnection:{headers:{Accept:"application/json",Authorization:"","X-GitHub-Api-Version":"2022-11-28"},method:"GET",responseKeyMatch:["id"],url:"https://api.github.com/user"}}],fieldType:"config",id:"connection-id",label:i("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),r=({$:e,e:n})=>{e.setThisComponent(t=>{e.util.isConnectionComponent(t)&&t.connectionsTypes.forEach(o=>{var a;o.type==="api_key"&&((a=o.verifyConnection)!=null&&a.headers)&&(o.verifyConnection.headers.Authorization=`Bearer ${n.value}`)})})},h=e=>({$:n,e:t})=>{n.setThisComponent(o=>{o.value=t}),n.setDb(o=>{o[e]=t})};export{r as a,s as c,h};
