import{_ as e,y as i}from"./main-tangy-colts-beg.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,n){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,n),n)}};const r=o=>({componentName:o.componentName.connection,connectionsTypes:[{encryptKeys:["username","password"],label:e("Basic Auth"),type:"basic_auth",verifyConnection:{headers:{Authorization:"","Content-Type":"application/json"},method:"GET",responseKeyMatch:["boards"],url:`${i.WP_API_URL.base}fluent-boards/v2/projects`}}],extraComponents:[{className:"my-3",componentName:o.componentName.note,id:"note",label:e("Note"),note:[e("**Username**: Your WordPress username"),e("## Create New Application Password :"),e("1. Log in to your WordPress admin dashboard"),e("2. Navigate to the **Users** > **Profile**."),e("3. Scroll down to the **Application Passwords** section."),e("4. In the **Application Passwords** section, enter a name for your application (e.g., **Fluent Boards API**)."),e("5. Click **Add New Application Password**.")],render:!0}],extraData:{},fieldType:"config",id:"connection-id",label:e("Select Connection"),onConnectionAddChange:"CONNECTION_ADD_CHANGE",onConnectionChange:"SET_CONNECTION",render:!0,value:void 0}),h=({$:o,e:n})=>{o.setThisComponent(a=>{o.util.isConnectionComponent(a)&&a.connectionsTypes.forEach(t=>{var s;t.type==="basic_auth"&&((s=t.verifyConnection)!=null&&s.headers)&&(t.verifyConnection.headers.Authorization="Basic "+btoa(`${n.username}:${n.password}`))})})};export{r as c,h};
