import{d as y,eB as b,eA as C,G as _,b as g,c as I,u as w}from"./outputWidgets.64a2583c.js";import{b as h}from"./index.45285259.js";import"./authorManager.0bee9983.js";import{C as i}from"./connector.92fea0cb.js";import{a as k}from"./asyncComputed.559326e2.js";import{q as x,n as E}from"./icons.873ac310.js";import{C as D}from"./CrudView.af999a93.js";import"./index.cf4c23b9.js";import"./record.42955563.js";import"./pubsub.94793a5f.js";import"./gateway.8971e972.js";import"./Title.da3641a1.js";import"./Text.a0dc2367.js";import"./FormItem.ab6cb002.js";import"./hasIn.deb6fbcb.js";import"./Form.833081c3.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.572b3411.js";import"./router.f8eb5e4a.js";import"./index.3803f9f8.js";import"./url.8d05971e.js";import"./index.1e9dc113.js";import"./index.1808a93f.js";import"./index.f667c6e0.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]="40d5dca0-0ffc-404e-a1b9-3fbd4d1ce743",o._sentryDebugIdIdentifier="sentry-dbid-40d5dca0-0ffc-404e-a1b9-3fbd4d1ce743")}catch{}})();const W=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=_(()=>{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)=>(g(),I(D,{"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{W as default};
//# sourceMappingURL=Connectors.f259f630.js.map
