import{d as y,ez as b,ey as C,F as g,b as _,c as I,u as h}from"./outputWidgets.2f984d8c.js";import{b as w}from"./index.591d95e0.js";import"./router.a345177b.js";import"./jwt-decode.esm.74bd4619.js";import{C as i}from"./connector.4bdb6af9.js";import{a as k}from"./asyncComputed.e24f1c59.js";import{u as x,o as E}from"./icons.01a3c723.js";import{C as D}from"./CrudView.efb1cc0d.js";import"./index.cf4c23b9.js";import"./record.767acc01.js";import"./pubsub.4b35560e.js";import"./FormItem.03241454.js";import"./hasIn.9bc86e38.js";import"./storage.83f66495.js";import"./index.4ff8ae43.js";import"./Title.569da09f.js";import"./Text.0232fe9c.js";import"./Form.0a4fce66.js";import"./Modal.6eebfd80.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.785054eb.js";import"./url.0b412367.js";import"./index.5615e480.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]="91326f24-acf0-4047-9544-86f8fc79592d",o._sentryDebugIdIdentifier="sentry-dbid-91326f24-acf0-4047-9544-86f8fc79592d")}catch{}})();const U=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(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: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)=>(_(),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.02bc1e44.js.map
