import{d as b,eB as f,eA as C,G as _,b as g,c as I,u as w}from"./outputWidgets.fdae7e91.js";import{b as h}from"./index.30fe2a77.js";import"./authorManager.adc33c37.js";import{C as i}from"./connector.115a5aad.js";import{a as k}from"./asyncComputed.43537aae.js";import{o as x,l as E}from"./icons.59384d21.js";import{C as D}from"./CrudView.e3fe23cf.js";import"./index.cf4c23b9.js";import"./record.f963a373.js";import"./pubsub.61789656.js";import"./gateway.8c35b4b8.js";import"./Title.e4079793.js";import"./Text.2d7466b9.js";import"./FormItem.45b6065e.js";import"./hasIn.e6601643.js";import"./Form.d4070d32.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.ed9adb70.js";import"./router.ae435e74.js";import"./index.6f560850.js";import"./url.f60fbe92.js";import"./index.42add8ec.js";import"./index.9026b0b4.js";import"./index.a700463c.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]="829d0867-4bf6-4592-9624-8caecb95ab70",o._sentryDebugIdIdentifier="sentry-dbid-829d0867-4bf6-4592-9624-8caecb95ab70")}catch{}})();const W=b({__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(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=k(()=>i.list(c)),u=_(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=l.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:y}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=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.39de6896.js.map
