import{d as y,eA as b,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.b43a489b.js";import{b as k}from"./index.d989c562.js";import"./console.bbd86620.js";import{C as i}from"./connector.c3fb0bca.js";import{a as w}from"./asyncComputed.a42e75bb.js";import{e as x,q as E}from"./icons.de9af46a.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.85d5e2a7.js";import"./index.42b92ee8.js";import"./Form.1797df89.js";import"./Title.47040052.js";import"./CollapsePanel.3e5384f9.js";import"./index.523f4a12.js";import"./index.65dea612.js";import"./index.9c88be1a.js";import"./dayjs.caeff4fe.js";import"./index.0279b5ff.js";import"./index.956893d2.js";import"./TabPane.b49c19a0.js";import"./index.0887e3a5.js";import"./index.a775b9cf.js";import"./index.e641ddba.js";import"./index.479accfd.js";import"./index.9367a16c.js";import"./index.8df4e710.js";import"./index.2fc0be8f.js";import"./index.8a60ee51.js";import"./index.85f24c29.js";import"./activeRecord.2bc5cc59.js";import"./pubsub.6fd47a9d.js";import"./gateway.38461683.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="5faf190b-959e-433b-a77c-a4dabace596a",o._sentryDebugIdIdentifier="sentry-dbid-5faf190b-959e-433b-a77c-a4dabace596a")}catch{}})();const ne=y({__name:"Connectors",setup(o){const r=b(),a=_(),c=r.params.projectId;async function s(e){const t=await i.create(c,e.name,e.type);a.push({name:"connectorEditor",params:{connectorId:t.id}})}const p=[{key:"name",label:"Connector name",type:"text"},{key:"type",label:"Connector type",type:Object.entries(k.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=w(()=>i.list(c)),u=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=l.value)==null?void 0:e.map(n=>({key:n.id,cells:[{text:n.name,link:{name:"connectorEditor",params:{connectorId:n.id}}},{text:n.type},{text:"Actions",actions:[{icon:x,label:"Edit",onClick({key:f}){a.push({name:"connectorEditor",params:{connectorId:f}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),I(D,{"entity-name":"connector",loading:h(m),title:"Connectors",description:"Each connector is a version of your app. You can create a new connector by deploying your app from the local editor.","empty-title":"No connectors here yet",table:u.value,fields:p,"create-button-text":"Create connector",onCreate:s},null,8,["loading","table"]))}});export{ne as default};
//# sourceMappingURL=Connectors.b8985de4.js.map
