import{d as f,eB as b,eA as C,G as _,b as g,c as I,u as w}from"./outputWidgets.781e41f9.js";import{b as h}from"./index.fc2f40fb.js";import"./authorManager.2805bec3.js";import{C as i}from"./connector.4086795b.js";import{a as k}from"./asyncComputed.d06d5356.js";import{u as x,o as E}from"./icons.0ffc383b.js";import{C as D}from"./CrudView.331f38ea.js";import"./index.cf4c23b9.js";import"./record.71f43d7d.js";import"./pubsub.2273fc34.js";import"./Title.bf1f8106.js";import"./Text.6168f33a.js";import"./FormItem.341ebdb6.js";import"./hasIn.205b6afa.js";import"./Form.a1506234.js";import"./Modal.3a32e945.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.942344e3.js";import"./router.2dba10c4.js";import"./index.db0f7a49.js";import"./url.a0d7eae0.js";import"./index.0ad8ad84.js";import"./index.574af34c.js";import"./index.b2c1bb4a.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]="37c62a00-3371-4a18-956f-b28ce4e55a28",o._sentryDebugIdIdentifier="sentry-dbid-37c62a00-3371-4a18-956f-b28ce4e55a28")}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(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=k(()=>i.list(c)),u=_(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=l.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(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),I(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{W as default};
//# sourceMappingURL=Connectors.3058425f.js.map
