import{d as y,eA as b,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.541a6a3f.js";import{b as k}from"./index.56c0102f.js";import"./console.7080c244.js";import{C as i}from"./connector.51a34ab9.js";import{a as w}from"./asyncComputed.6496ca6b.js";import{e as x,p as E}from"./icons.fbbc5318.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.af69973c.js";import"./index.1b1480b6.js";import"./Form.2a9acb85.js";import"./Title.3011141f.js";import"./index.7fb7f882.js";import"./index.33fb7a48.js";import"./index.5d5870f2.js";import"./dayjs.03d6e1d3.js";import"./index.f20ad580.js";import"./index.d89692b2.js";import"./TabPane.40396dd5.js";import"./index.ef35da09.js";import"./index.c3edc651.js";import"./index.dda022dd.js";import"./index.1797b918.js";import"./index.7f86f9a3.js";import"./index.68ffc7e6.js";import"./index.3cff0676.js";import"./index.07910c0e.js";import"./activeRecord.867c40fa.js";import"./pubsub.8482a29f.js";import"./gateway.647cec74.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]="e95d084c-f0f3-4169-b2fc-fcafd14e339e",o._sentryDebugIdIdentifier="sentry-dbid-e95d084c-f0f3-4169-b2fc-fcafd14e339e")}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: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{te as default};
//# sourceMappingURL=Connectors.1e6698b1.js.map
