import{d as y,eA as b,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.c072fe4e.js";import{b as k}from"./index.90440471.js";import"./console.a87f2a82.js";import{C as i}from"./connector.6aa3061f.js";import{a as w}from"./asyncComputed.376cdc00.js";import{e as x,q as E}from"./icons.158b4825.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.9296340f.js";import"./index.00103e26.js";import"./Form.9f52866c.js";import"./Title.e3dcb8ea.js";import"./CollapsePanel.ecfd8c73.js";import"./index.d808811c.js";import"./index.ec8e038a.js";import"./index.dce83dc7.js";import"./dayjs.a56ae918.js";import"./index.4e6af937.js";import"./index.8ab39784.js";import"./TabPane.df5f41ca.js";import"./index.c5fd7926.js";import"./index.148bcdd7.js";import"./index.d9c3e0de.js";import"./index.e5a5efcd.js";import"./index.e7c5574b.js";import"./index.96de14c0.js";import"./index.28ce0851.js";import"./index.2e3640f1.js";import"./index.4cff163b.js";import"./activeRecord.fdc25b97.js";import"./pubsub.98ad9fe0.js";import"./gateway.18ca6e0a.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]="4984acb6-9358-4519-8dd0-72f5c1ef0f74",o._sentryDebugIdIdentifier="sentry-dbid-4984acb6-9358-4519-8dd0-72f5c1ef0f74")}catch{}})();const ne=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: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.2c3c3e3c.js.map
