import{d as f,eC as b,eJ as C,J as g,o as _,c as h,u as w,eP as I}from"./vue-router.6b399b0b.js";import{b as k}from"./index.c3b84c4d.js";import"./gateway.34f2a318.js";import{C as i}from"./connector.ffc0a3ef.js";import{a as x}from"./asyncComputed.c7982027.js";import{G as E}from"./PhPencil.vue.5fbcac5a.js";import{C as D}from"./CrudView.30543074.js";import"./record.f5201a57.js";import"./string.79d7b0e1.js";import"./popupNotifcation.17b9c327.js";import"./router.ab3f179a.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.e21048fc.js";import"./BookOutlined.7993dbf1.js";import"./url.2f4a4260.js";import"./index.57cdc892.js";import"./index.2e72b67b.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]="943fdb21-cbb2-4d9c-a2fd-7cee7898566d",o._sentryDebugIdIdentifier="sentry-dbid-943fdb21-cbb2-4d9c-a2fd-7cee7898566d")}catch{}})();const A=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:d,result:l,refetch:m}=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:I,label:"Delete",dangerous:!0,async onClick(){await n.delete(),m()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),h(D,{"entity-name":"connector",loading:w(d),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{A as default};
//# sourceMappingURL=Connectors.8d4c346b.js.map
