import{d as y,ey as b,ex as _,H as C,b as g,c as I,u as h}from"./registerWidgets.5ceb46ef.js";import{b as k}from"./index.e1d2843e.js";import"./gateway.fadd845e.js";import{C as s}from"./connector.d151d92c.js";import{a as w}from"./asyncComputed.fd157db2.js";import{e as x,o as E}from"./icons.b59fe784.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.af549d55.js";import"./passwordlessManager.db35a950.js";import"./pubsub.451b7de0.js";import"./storage.4e9cf889.js";import"./activeRecord.693e9703.js";import"./Modal.4e47c5c5.js";import"./Title.d4cb8bc4.js";import"./index.1a41b32a.js";import"./index.f7704414.js";import"./index.4fdcdf65.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="75ebef9d-ab2a-486b-8cf6-f8a368d26933",o._sentryDebugIdIdentifier="sentry-dbid-75ebef9d-ab2a-486b-8cf6-f8a368d26933")}catch{}})();const J=y({__name:"Connectors",setup(o){const a=b(),r=_(),c=a.params.projectId;async function i(e){const t=await s.create(c,e.name,e.type);r.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:l,result:m,refetch:d}=w(()=>s.list(c)),u=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=m.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:f}){r.push({name:"connectorEditor",params:{connectorId:f}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),I(D,{"entity-name":"connector",loading:h(l),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:i},null,8,["loading","table"]))}});export{J as default};
//# sourceMappingURL=Connectors.ea6ac0e9.js.map
