import{d as f,eB as b,eA as C,H as g,b as _,c as I,u as h}from"./outputWidgets.83ad65aa.js";import{b as w}from"./index.9f577453.js";import"./router.1b8539af.js";import{C as i}from"./connector.3193f003.js";import{a as k}from"./asyncComputed.eebec89e.js";import{H as x,i as E}from"./icons.ec92f7f9.js";import{C as D}from"./CrudView.fb55c5f4.js";import"./index.cf4c23b9.js";import"./record.df4e3ae7.js";import"./pubsub.6c6cbc8d.js";import"./Form.5deb3adb.js";import"./hasIn.597d0078.js";import"./Paragraph.eee68d2f.js";import"./Base.5de97c83.js";import"./Typography.fea800b8.js";import"./Modal.00c72438.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.d125b27a.js";import"./url.27ce9387.js";import"./index.677f843d.js";import"./Title.50be6d8b.js";import"./Text.72dc1978.js";import"./index.06a93781.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]="ce743715-ce57-45d3-8453-39df870b018e",o._sentryDebugIdIdentifier="sentry-dbid-ce743715-ce57-45d3-8453-39df870b018e")}catch{}})();const U=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{U as default};
//# sourceMappingURL=Connectors.d0f3d193.js.map
