import{d as f,ez as b,ey as C,F as g,b as _,c as I,u as h}from"./outputWidgets.b703ca45.js";import{b as w}from"./index.58a6f7ec.js";import"./router.c2e4e322.js";import"./jwt-decode.esm.74bd4619.js";import{C as i}from"./connector.d45eeda2.js";import{a as k}from"./asyncComputed.557fdbc3.js";import{u as x,o as E}from"./icons.5202cd65.js";import{C as D}from"./CrudView.93e41830.js";import"./index.cf4c23b9.js";import"./record.6a34e5b4.js";import"./pubsub.781c61cb.js";import"./FormItem.39e0b98f.js";import"./hasIn.66135dec.js";import"./storage.4f0beb94.js";import"./index.cd3799ce.js";import"./Title.c76d824d.js";import"./Text.4646803d.js";import"./Form.44bc3190.js";import"./Modal.c03e4b0a.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.69b7b47b.js";import"./url.7a748c18.js";import"./index.5255b475.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="43975d71-92aa-4bb4-b363-f991f7faaa0d",o._sentryDebugIdIdentifier="sentry-dbid-43975d71-92aa-4bb4-b363-f991f7faaa0d")}catch{}})();const U=f({__name:"Connectors",setup(o){const a=b(),r=C(),c=a.params.projectId;async function s(e){const t=await i.create(c,e.name,e.type);r.push({name:"connectorEditor",params:{connectorId:t.id}})}const p=[{key:"name",label:"Connector name",type:"text"},{key:"type",label:"Connector type",type:Object.entries(w.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=k(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=l.value)==null?void 0:e.map(n=>({key:n.id,cells:[{type:"link",text:n.name,to:{name:"connectorEditor",params:{connectorId:n.id}}},{type:"text",text:n.type},{type:"actions",actions:[{icon:x,label:"Edit",onClick({key:y}){r.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),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{U as default};
//# sourceMappingURL=Connectors.561ae162.js.map
