import{d as f,eC as b,eJ as C,K as g,b as _,c as h,u as w,eP as I}from"./vue-router.67809441.js";import{b as k}from"./index.faf1d629.js";import"./gateway.e3e12758.js";import{C as i}from"./connector.e4f94045.js";import{a as x}from"./asyncComputed.c6a51599.js";import{G as E}from"./PhPencil.vue.b433ceda.js";import{C as D}from"./CrudView.6a433a98.js";import"./record.79dce665.js";import"./string.d96a9f97.js";import"./popupNotifcation.c8631a6a.js";import"./router.f4c6c59f.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.30df229c.js";import"./BookOutlined.aea72855.js";import"./url.bf0f022f.js";import"./index.bad8e5d7.js";import"./index.31900902.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]="6e1d64e1-4db8-4667-906b-92ca750ca03f",o._sentryDebugIdIdentifier="sentry-dbid-6e1d64e1-4db8-4667-906b-92ca750ca03f")}catch{}})();const z=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: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{z as default};
//# sourceMappingURL=Connectors.15523bc4.js.map
