import{d as y,eB as f,eA as C,H as g,b as I,c as _,u as h}from"./outputWidgets.108432da.js";import{b as w}from"./index.23178e03.js";import"./router.2ffebeb2.js";import{C as i}from"./connector.1b8dabd0.js";import{a as k}from"./asyncComputed.9818a09a.js";import{I as x,i as E}from"./icons.9db31d3d.js";import{C as D}from"./CrudView.a9daec59.js";import"./index.cf4c23b9.js";import"./record.15041cf5.js";import"./pubsub.98ab975f.js";import"./Form.a76f1164.js";import"./hasIn.7973e16b.js";import"./Paragraph.d17409a8.js";import"./Base.f7c93d8e.js";import"./Typography.6afbacd7.js";import"./Modal.efcd7ec2.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.c535f159.js";import"./url.42281f8e.js";import"./index.3d290fbb.js";import"./Title.98d4c800.js";import"./Text.1a62e50a.js";import"./index.5578279a.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]="d37419b5-2c16-4b76-bb46-fb2dc38786f9",o._sentryDebugIdIdentifier="sentry-dbid-d37419b5-2c16-4b76-bb46-fb2dc38786f9")}catch{}})();const U=y({__name:"Connectors",setup(o){const r=f(),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: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)=>(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.d414faf5.js.map
