import{d as f,eu as b,eH as C,f as g,c as _,u as I,eI as h,o as w}from"./vue-router.4fd4520f.js";import{b as k}from"./tables.cb9d1914.js";import"./gateway.2e2b2bcf.js";import{C as i}from"./connector.a1de12db.js";import{a as x}from"./asyncComputed.7c051de7.js";import{G as E}from"./PhPencil.vue.11dc8009.js";import{C as D}from"./CrudView.1ccf505e.js";import"./record.ab5bf640.js";import"./string.3be91b30.js";import"./popupNotifcation.b3d7898e.js";import"./router.bb3a61e7.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.50bbaf08.js";import"./BookOutlined.3f1562e1.js";import"./url.d2bb0884.js";import"./PhDotsThree.vue.cfccf254.js";import"./index.b858c0db.js";import"./index.ced107b2.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]="1baf6077-06a7-453b-bfed-2d01743131be",o._sentryDebugIdIdentifier="sentry-dbid-1baf6077-06a7-453b-bfed-2d01743131be")}catch{}})();const J=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:h,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(w(),_(D,{"entity-name":"connector",loading:I(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{J as default};
//# sourceMappingURL=Connectors.738dc8c3.js.map
