import{d as y,eA as b,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.b9aa154a.js";import{b as k}from"./index.4d631048.js";import"./console.ee73e2aa.js";import{C as i}from"./connector.a79c7a97.js";import{a as w}from"./asyncComputed.9bda3979.js";import{e as x,p as E}from"./icons.4ed83c58.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.8866a12f.js";import"./index.ade1bec6.js";import"./Form.55f226f4.js";import"./Title.6cd833fd.js";import"./index.74d4e484.js";import"./index.6b140cad.js";import"./index.29aa7167.js";import"./dayjs.d2a09bae.js";import"./index.ea68e603.js";import"./index.bb85a084.js";import"./TabPane.3d00468a.js";import"./index.ab1855db.js";import"./index.14f3ef13.js";import"./index.eb23b22d.js";import"./index.45ef6041.js";import"./index.45ac8fb9.js";import"./index.004b987c.js";import"./index.23063916.js";import"./index.55488473.js";import"./activeRecord.8939db5d.js";import"./pubsub.967f482a.js";import"./gateway.5aa82c5f.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]="43c1bff2-4d28-40a6-981b-3ca284f6aeb3",o._sentryDebugIdIdentifier="sentry-dbid-43c1bff2-4d28-40a6-981b-3ca284f6aeb3")}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.8bbcb1a8.js.map
