import{e as a}from"./main-few-lands-burn.js";const c=n=>({addConnectionHelpingText:a('You can find credentials from <a target="_blank" class="text-blue-600 underline" rel="noopener noreferrer nofollow" href="https://www.perplexity.ai/account/api/keys">Here</a>'),componentName:n.componentName.connection,connectionsTypes:[{encryptKeys:["value"],label:a("API Key"),showKey:!1,type:"api_key",verifyConnection:{headers:{accept:"application/json",Authorization:"","content-type":"application/json"},method:"GET",responseKeyMatch:["requests"],url:"https://api.perplexity.ai/async/chat/completions"}}],fieldType:"config",id:"connection-id",label:a("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),s=({$:n,e:t})=>{n.setThisComponent(o=>{n.util.isConnectionComponent(o)&&o.connectionsTypes.forEach(e=>{e.type==="api_key"&&e.verifyConnection?.headers&&(e.verifyConnection.headers.Authorization=`Bearer ${t.value}`)})})},r=n=>({$:t,e:o})=>{t.setThisComponent(e=>{e.value=o}),t.setDb(e=>{e[n]=o})};export{r as a,c,s as h};
