import{d as f,eA as b,ez as _,J as C,b as g,c as I,u as h}from"./outputWidgets.1f391ab3.js";import{b as k}from"./index.e8fb5940.js";import"./console.3edc9cde.js";import{C as i}from"./connector.aeffa141.js";import{a as w}from"./asyncComputed.56fb497e.js";import{e as x,q as E}from"./icons.35fd2af6.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.fc3376a4.js";import"./index.a24e4cfd.js";import"./Form.d88e907e.js";import"./Title.e19c9b7e.js";import"./CollapsePanel.ed22c9ce.js";import"./index.3daa08be.js";import"./index.beaf06d8.js";import"./index.16917afa.js";import"./dayjs.12321a58.js";import"./index.06f9a351.js";import"./index.130e9d58.js";import"./TabPane.49afc3f4.js";import"./index.a2705008.js";import"./index.257ed691.js";import"./index.72e9f57c.js";import"./index.4260e6cf.js";import"./index.f0baefdd.js";import"./index.37b8f4ea.js";import"./index.18aa8459.js";import"./index.d09067f1.js";import"./index.6e066317.js";import"./activeRecord.b9964a93.js";import"./pubsub.ab26e051.js";import"./gateway.98993b50.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]="dad668c4-f21a-4224-940b-cd233c934054",o._sentryDebugIdIdentifier="sentry-dbid-dad668c4-f21a-4224-940b-cd233c934054")}catch{}})();const ne=f({__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:y}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{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{ne as default};
//# sourceMappingURL=Connectors.88df97a7.js.map
