import{d as f,eA as b,eM as C,f as g,o as _,c as h,u as w,eN as I}from"./vue-router.637ad36e.js";import{b as k}from"./tables.0c659977.js";import"./gateway.e1c89e24.js";import{C as i}from"./connector.06a2341f.js";import{a as x}from"./asyncComputed.0b7f3eaf.js";import{G as E}from"./PhPencil.vue.5353ab56.js";import{C as D}from"./CrudView.3cb1fb74.js";import"./record.833ab838.js";import"./string.876500c9.js";import"./popupNotifcation.498cf509.js";import"./router.3a426b39.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.9833e445.js";import"./BookOutlined.c02a6591.js";import"./url.c1cbace3.js";import"./index.ba283bad.js";import"./index.faf7cd82.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="8b79fac8-8a31-4c91-a1e3-96617a3c9d48",o._sentryDebugIdIdentifier="sentry-dbid-8b79fac8-8a31-4c91-a1e3-96617a3c9d48")}catch{}})();const H=f({__name:"Connectors",setup(o){const a=b(),r=C(),c=a.params.projectId;async function s(e){const t=await i.create(c,e.name,e.type);r.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}){r.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:I,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),h(D,{"entity-name":"connector",loading:w(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.b0acc74a.js.map
