import{d as y,eB as b,eA as C,G as g,b as _,c as I,u as w}from"./outputWidgets.32262ea4.js";import{b as h}from"./index.2dfe4d35.js";import"./authorManager.bf87d9ac.js";import{C as i}from"./connector.d902343b.js";import{a as k}from"./asyncComputed.2515c9c2.js";import{v as x,g as E}from"./icons.f6f8ddd9.js";import{C as v}from"./CrudView.3a879739.js";import"./index.cf4c23b9.js";import"./record.b25fae92.js";import"./pubsub.688bf9b2.js";import"./gateway.c70bbf22.js";import"./Text.5738d3bb.js";import"./Title.4f1fbb5b.js";import"./FormItem.dc863e60.js";import"./hasIn.4e5c4024.js";import"./Form.0ac7561e.js";import"./Modal.1c897574.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.db135e16.js";import"./router.24325fd4.js";import"./index.1d7a7a89.js";import"./url.bc186fa2.js";import"./index.e1a424df.js";import"./index.62cf3b9c.js";import"./index.0278a234.js";import"./index.df3792d3.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]="f0eb651a-1b86-44eb-92fd-7586fdd0980c",o._sentryDebugIdIdentifier="sentry-dbid-f0eb651a-1b86-44eb-92fd-7586fdd0980c")}catch{}})();const Z=y({__name:"Connectors",setup(o){const r=b(),a=C(),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(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:d,refetch:l}=k(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=d.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(),l()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),I(v,{"entity-name":"connector",loading:w(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{Z as default};
//# sourceMappingURL=Connectors.cd2e426e.js.map
