import{d as f,eB as b,eA as C,H as g,b as _,c as I,u as h}from"./outputWidgets.ed989e0a.js";import{b as w}from"./index.46777a19.js";import"./router.5e7d449c.js";import{C as i}from"./connector.3b35b290.js";import{a as k}from"./asyncComputed.9f78a6df.js";import{H as x,i as E}from"./icons.8f8b8d07.js";import{C as D}from"./CrudView.919cb08b.js";import"./index.cf4c23b9.js";import"./record.f2e811cc.js";import"./pubsub.14278e58.js";import"./Form.fe660512.js";import"./hasIn.264c6078.js";import"./popupNotifcation.c17802b7.js";import"./Paragraph.4678e06b.js";import"./Base.42a4c5ca.js";import"./Typography.5e43ce25.js";import"./Modal.1ce4fb47.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.a2269c93.js";import"./url.7656a70f.js";import"./index.881316ff.js";import"./Title.7eb91981.js";import"./Text.8e13d454.js";import"./index.f09baa6d.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]="d6fa5a78-3ea2-45c6-9983-79784e101d15",o._sentryDebugIdIdentifier="sentry-dbid-d6fa5a78-3ea2-45c6-9983-79784e101d15")}catch{}})();const W=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(w.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=k(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=l.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:x,label:"Edit",onClick({key:y}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),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{W as default};
//# sourceMappingURL=Connectors.278d6556.js.map
