import{d as y,ey as b,ex as _,H as C,b as g,c as I,u as h}from"./registerWidgets.ca57da3e.js";import{b as k}from"./index.27945116.js";import"./gateway.b88d532a.js";import{C as s}from"./connector.7349b764.js";import{a as w}from"./asyncComputed.ae0b6a3c.js";import{e as x,o as E}from"./icons.1efe7950.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.7b5510ae.js";import"./passwordlessManager.8d47b009.js";import"./pubsub.277d05a3.js";import"./storage.2a7aac1e.js";import"./activeRecord.f8743cd4.js";import"./Modal.db45c3f3.js";import"./Title.e5d7f1b0.js";import"./transButton.a2961478.js";import"./index.b0c465bd.js";import"./Text.1f2709b6.js";import"./index.e15362b2.js";import"./index.9943ced7.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]="f5805e47-ee08-474d-8738-21fb7fb86764",o._sentryDebugIdIdentifier="sentry-dbid-f5805e47-ee08-474d-8738-21fb7fb86764")}catch{}})();const L=y({__name:"Connectors",setup(o){const r=b(),a=_(),c=r.params.projectId;async function i(e){const t=await s.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(k.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:l,refetch:d}=w(()=>s.list(c)),u=C(()=>{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:f}){a.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(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:i},null,8,["loading","table"]))}});export{L as default};
//# sourceMappingURL=Connectors.3ddbf42e.js.map
