import{d as f,eA as b,eI as C,H as g,b as _,c as I,u as h,eQ as w}from"./outputWidgets.67d01534.js";import{b as k}from"./index.af8a2c28.js";import"./router.da0efacf.js";import{C as i}from"./connector.959958f4.js";import{a as x}from"./asyncComputed.9c2e7c90.js";import{G as E}from"./PhPencil.vue.fd512d1d.js";import{C as D}from"./CrudView.d78585d4.js";import"./index.cf4c23b9.js";import"./record.97ce606c.js";import"./pubsub.ce0b10ac.js";import"./Form.18143f38.js";import"./hasIn.18867aca.js";import"./popupNotifcation.48a418fa.js";import"./Paragraph.5d6efe5b.js";import"./Text.fce07a64.js";import"./Modal.e44b2640.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.00cfbae2.js";import"./BookOutlined.93eb4c42.js";import"./url.df413b89.js";import"./index.3dca3a8f.js";import"./Title.3431c309.js";import"./index.378e6c26.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]="fe8a7732-27b2-48c1-89c3-8a509f2b803b",o._sentryDebugIdIdentifier="sentry-dbid-fe8a7732-27b2-48c1-89c3-8a509f2b803b")}catch{}})();const S=f({__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(k.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=x(()=>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:E,label:"Edit",onClick({key:y}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:w,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{S as default};
//# sourceMappingURL=Connectors.1868ff4b.js.map
