import{_ as o}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 r=e=>({addConnectionHelpingText:o("You can find your API key from ")+`<a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://openrouter.ai/keys">${o("OpenRouter Dashboard")}</a>`,componentName:e.componentName.connection,connectionsTypes:[{encryptKeys:["value"],label:o("API Key"),showKey:!1,type:"api_key",verifyConnection:{headers:{Authorization:""},method:"GET",responseKeyMatch:["data.label"],url:"https://openrouter.ai/api/v1/auth/key"}}],fieldType:"config",id:"connection-id",label:o("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),h=({$:e,e:n})=>{e.setThisComponent(a=>{e.util.isConnectionComponent(a)&&a.connectionsTypes.forEach(t=>{var i;t.type==="api_key"&&((i=t.verifyConnection)!=null&&i.headers)&&(t.verifyConnection.headers.Authorization="Bearer "+n.value)})})};export{r as c,h};
