import{d as f,eB as b,eA as C,H as g,b as I,c as _,u as h}from"./outputWidgets.91c9f730.js";import{b as w}from"./index.7bd5dae7.js";import"./router.e4c5e9fd.js";import{C as i}from"./connector.e9b19812.js";import{a as k}from"./asyncComputed.5cff1726.js";import{I as x,i as E}from"./icons.e854b740.js";import{C as D}from"./CrudView.d1c2398f.js";import"./index.cf4c23b9.js";import"./record.48aae23b.js";import"./pubsub.25829540.js";import"./Form.f24a1c0a.js";import"./hasIn.d8588324.js";import"./popupNotifcation.e7a2b93a.js";import"./Paragraph.18e7082b.js";import"./Base.79932679.js";import"./Typography.c7c5698a.js";import"./Modal.41a7632f.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.05ceca6e.js";import"./url.bd840ee9.js";import"./index.5a63d36f.js";import"./Title.69e80303.js";import"./Text.2f03529d.js";import"./index.946fdb2e.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]="37232787-44d0-4cdd-96a8-346f177efd9e",o._sentryDebugIdIdentifier="sentry-dbid-37232787-44d0-4cdd-96a8-346f177efd9e")}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:d,refetch:l}=k(()=>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: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)=>(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.18cb12d4.js.map
