import{d as y,eA as f,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.17392370.js";import{b as k}from"./index.c5e8e3a4.js";import"./console.9b12928f.js";import{C as c}from"./connector.f9f63a05.js";import{a as w}from"./asyncComputed.76849272.js";import{e as x,q as E}from"./icons.baa5f07a.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.c4e89a02.js";import"./index.7c30bb7a.js";import"./Form.e398e550.js";import"./Title.bc3ff086.js";import"./CollapsePanel.853dbd0d.js";import"./index.2e2d3a0a.js";import"./index.ba0ff767.js";import"./index.84380f11.js";import"./dayjs.05e1ae11.js";import"./index.56ff0f0c.js";import"./index.bd94f307.js";import"./TabPane.25e9ccd4.js";import"./index.8aa7fba2.js";import"./index.50017ce4.js";import"./index.fffd13c2.js";import"./index.d2f4083e.js";import"./index.1fd97730.js";import"./index.3e3b85af.js";import"./index.18880d1b.js";import"./index.8c91651f.js";import"./index.8d8985c7.js";import"./activeRecord.84b679f6.js";import"./pubsub.fc739490.js";import"./gateway.ee06b706.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]="4bd840b1-d063-4613-b879-a2eeb5b06536",o._sentryDebugIdIdentifier="sentry-dbid-4bd840b1-d063-4613-b879-a2eeb5b06536")}catch{}})();const ne=y({__name:"Connectors",setup(o){const r=f(),a=_(),i=r.params.projectId;async function s(e){const t=await c.create(i,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(()=>c.list(i)),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:b}){a.push({name:"connectorEditor",params:{connectorId:b}})}},{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.9413b567.js.map
