import{d as f,eE as b,eK as C,J as g,b as _,c as h,u as w,eS as I}from"./outputWidgets.6e1c5425.js";import{b as k}from"./index.76daa7f6.js";import"./router.4a0ba06b.js";import{C as i}from"./connector.013a77e2.js";import{a as x}from"./asyncComputed.06ede41f.js";import{G as E}from"./PhPencil.vue.09a8c9d5.js";import{C as D}from"./CrudView.88823d06.js";import"./record.c7d63161.js";import"./pubsub.4f3043c8.js";import"./Form.b82a2cec.js";import"./hasIn.bf07751b.js";import"./popupNotifcation.76f4dd63.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.3a6e05dd.js";import"./BookOutlined.8202b78f.js";import"./url.5357e9db.js";import"./Paragraph.4ce326b3.js";import"./Base.0277cf44.js";import"./Modal.e50e9e9a.js";import"./index.c12e1c2f.js";import"./Title.dfd37452.js";import"./Text.b10c1140.js";import"./index.1442882a.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]="e882beca-ee49-49d5-8973-deaf21f14da4",o._sentryDebugIdIdentifier="sentry-dbid-e882beca-ee49-49d5-8973-deaf21f14da4")}catch{}})();const Q=f({__name:"Connectors",setup(o){const r=b(),a=C(),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}=x(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=d.value)==null?void 0:e.map(n=>({key:n.id,cells:[{type:"link",text:n.name,to:{name:"connectorEditor",params:{connectorId:n.id}}},{type:"text",text:n.type},{type:"actions",actions:[{icon:E,label:"Edit",onClick({key:y}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:I,label:"Delete",dangerous:!0,async onClick(){await n.delete(),l()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),h(D,{"entity-name":"connector",loading:w(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{Q as default};
//# sourceMappingURL=Connectors.a2541cd0.js.map
