import{d as b,eB as f,eA as C,H as g,b as I,c as _,u as h}from"./outputWidgets.763535ec.js";import{b as w}from"./index.e272e65d.js";import"./router.4c31abb0.js";import{C as i}from"./connector.aa69f1ee.js";import{a as k}from"./asyncComputed.c1b5752d.js";import{I as x,i as E}from"./icons.39d7577b.js";import{C as D}from"./CrudView.0261ff81.js";import"./index.cf4c23b9.js";import"./record.ae98c277.js";import"./pubsub.e128dec2.js";import"./Form.93c1d68a.js";import"./hasIn.c3ad9d17.js";import"./popupNotifcation.59a7179b.js";import"./Paragraph.1d14da40.js";import"./Base.0423a633.js";import"./Typography.3b9809ab.js";import"./Modal.33014e22.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0d674672.js";import"./url.0280fc81.js";import"./index.5c5eefcc.js";import"./Title.b6a28a5f.js";import"./Text.1de1f1d2.js";import"./index.351b265c.js";import"./SyncOutlined.cf45cade.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]="e8b50d76-3b4b-4d7a-9e5c-7e668d235a17",o._sentryDebugIdIdentifier="sentry-dbid-e8b50d76-3b4b-4d7a-9e5c-7e668d235a17")}catch{}})();const X=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(w.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:d,refetch:l}=k(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=d.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}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),l()}}]}]})))!=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{X as default};
//# sourceMappingURL=Connectors.51a42950.js.map
