import{d as y,eA as b,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.eddbac36.js";import{b as k}from"./index.c1e978a8.js";import"./console.56ba8e89.js";import{C as i}from"./connector.94660840.js";import{a as w}from"./asyncComputed.fbd351ba.js";import{e as x,p as E}from"./icons.08aaa24c.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.d009f8f3.js";import"./index.cc18f239.js";import"./Form.f5163eed.js";import"./Title.7ca27be1.js";import"./index.1a0ec4ff.js";import"./index.31447910.js";import"./index.9c583b89.js";import"./dayjs.d80a3524.js";import"./index.8318ec36.js";import"./index.8b693270.js";import"./TabPane.05333dfb.js";import"./index.b6a61078.js";import"./index.7a28d537.js";import"./index.d099a09e.js";import"./index.933610ff.js";import"./index.2c51d0a8.js";import"./index.b131e8f9.js";import"./index.3475d619.js";import"./index.f428cf3a.js";import"./activeRecord.64b754df.js";import"./pubsub.9aea5614.js";import"./gateway.e4ec4a58.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]="ab4bcdf7-76d3-4f75-ac4c-a7b9de0d0703",o._sentryDebugIdIdentifier="sentry-dbid-ab4bcdf7-76d3-4f75-ac4c-a7b9de0d0703")}catch{}})();const te=y({__name:"Connectors",setup(o){const r=b(),a=_(),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:m,result:d,refetch:l}=w(()=>i.list(c)),u=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=d.value)==null?void 0:e.map(n=>({key:n.id,cells:[{text:n.name,link:{name:"connectorEditor",params:{connectorId:n.id}}},{text:n.type},{text:"Actions",actions:[{icon:x,label:"Edit",onClick({key:f}){a.push({name:"connectorEditor",params:{connectorId:f}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),l()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),I(D,{"entity-name":"connector",loading:h(m),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{te as default};
//# sourceMappingURL=Connectors.87b14fe9.js.map
