import{d as b,eA as y,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.75a5b0b9.js";import{b as k}from"./index.a131125e.js";import"./console.3fb52eaf.js";import{C as i}from"./connector.eab6e0d7.js";import{a as w}from"./asyncComputed.c701d7b0.js";import{e as x,q as E}from"./icons.c04528be.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.ff628288.js";import"./index.a1ee75ca.js";import"./Form.2c716183.js";import"./Title.b6c9692d.js";import"./index.b50eb903.js";import"./index.4598445f.js";import"./index.b6767512.js";import"./dayjs.d3366d83.js";import"./index.e24c456b.js";import"./index.7aacb57f.js";import"./TabPane.0d7849ee.js";import"./index.e9ba5796.js";import"./CollapsePanel.46ee4c6b.js";import"./index.3916405f.js";import"./index.5a67eb5f.js";import"./index.fe803cdf.js";import"./index.5e9c5434.js";import"./index.00d295c9.js";import"./index.fc88890c.js";import"./index.9c0809a0.js";import"./index.49e953af.js";import"./activeRecord.115270b9.js";import"./pubsub.3fa240d3.js";import"./gateway.99e43695.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]="81fa4ced-5b56-467e-bcb3-83afbf02a3e2",o._sentryDebugIdIdentifier="sentry-dbid-81fa4ced-5b56-467e-bcb3-83afbf02a3e2")}catch{}})();const ne=b({__name:"Connectors",setup(o){const r=y(),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:l,refetch:d}=w(()=>i.list(c)),u=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=l.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(),d()}}]}]})))!=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{ne as default};
//# sourceMappingURL=Connectors.2e052d3b.js.map
