import{d as f,eB as b,eO as C,f as g,c as _,u as h,eP as w,o as I}from"./vue-router.78d58ff0.js";import{b as k}from"./tables.aed54935.js";import"./gateway.3d93841d.js";import{C as i}from"./connector.1a942eb1.js";import{a as x}from"./asyncComputed.95993e52.js";import{G as E}from"./PhPencil.vue.50044340.js";import{C as D}from"./CrudView.f04f853e.js";import"./record.6c05e3f5.js";import"./string.b574f1fa.js";import"./popupNotifcation.466d80c0.js";import"./router.ce687edb.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.c6ea29d9.js";import"./BookOutlined.238416cb.js";import"./url.f92f4d36.js";import"./PhDotsThree.vue.4c71ca22.js";import"./index.8e2351ec.js";import"./index.e96c19f7.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]="11eab25b-dc80-4996-a9fc-ebe05703fe8b",o._sentryDebugIdIdentifier="sentry-dbid-11eab25b-dc80-4996-a9fc-ebe05703fe8b")}catch{}})();const H=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:l,result:m,refetch:d}=x(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=m.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(l),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{H as default};
//# sourceMappingURL=Connectors.ab225f3a.js.map
