var p=Object.defineProperty;var _=(t,e,a)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var c=(t,e,a)=>(_(t,typeof e!="symbol"?e+"":e,a),a);import{C as f}from"./ConnectorCard.00b8b9d6.js";import{e as m,d as h,o as r,c as l,w as o,u as n,b as u,aG as g,dd as b,db as v,dh as w,a as A,Y as y,eb as C,aS as k,S as x,eO as V,a0 as L}from"./index.3d66ab3f.js";import{C as D}from"./gateway.c90c4cc0.js";import{C as I}from"./router.ea31524e.js";import{A as N}from"./index.2a5e7e41.js";import"./Avatar.3702ea95.js";import"./Card.a639eb0c.js";import"./TabPane.6d18ecdb.js";import"./popupNotifcation.f439583b.js";import"./Badge.51abc7fa.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="27a297a7-028f-4412-ae00-1ced3b276902",t._sentryDebugIdIdentifier="sentry-dbid-27a297a7-028f-4412-ae00-1ced3b276902")}catch{}})();class U{async list(){return D.get("agents")}}const B="/src/assets/logo.svg";class O{constructor(e){this.data=e}get id(){return this.data.id}get name(){return this.data.name}get description(){return this.data.description}get setupPath(){return this.data.setupPath}get logoURL(){return this.data.logoURL||B}get unavailable(){return!this.data.isAvailable}}class P{constructor(e){c(this,"state");this.api=e,this.state=m({agents:[]})}async fetchAgents(){const e=await this.api.list();this.state.value.agents=e.map(a=>new O(a))}}const R={class:"agents-grid"},T=h({__name:"AgentsView",setup(t){const e=new P(new U);e.fetchAgents();function a(i){i.unavailable&&I.showNewMessage(V.translate("i18n_agents_ask_for_access",null,i.name))}return(i,E)=>(r(),l(n(N),{direction:"vertical",style:{width:"100%","margin-bottom":"30px"}},{default:o(()=>{var d;return[u(n(b),null,{default:o(()=>[g("Agents")]),_:1}),u(n(v),null,{default:o(()=>[g("Add and manage external integrations to your project.")]),_:1}),(d=n(e).state.value.agents)!=null&&d.length?(r(),l(n(w),{key:0,vertical:""},{default:o(()=>[A("div",R,[(r(!0),y(k,null,C(n(e).state.value.agents,s=>(r(),l(f,{key:s.id,title:s.name,"logo-url":s.logoURL,description:s.description,unavailable:s.unavailable,onClick:F=>a(s)},null,8,["title","logo-url","description","unavailable","onClick"]))),128))])]),_:1})):x("",!0)]}),_:1}))}});const Q=L(T,[["__scopeId","data-v-f766fd73"]]);export{Q as default};
//# sourceMappingURL=AgentsView.6dccc3d1.js.map
