import{d as f,ey as b,ex as _,H as C,b as g,c as I,u as h}from"./registerWidgets.faec4901.js";import{b as k}from"./index.a999bbce.js";import"./gateway.241cb512.js";import{C as s}from"./connector.606a3547.js";import{a as w}from"./asyncComputed.04758d6d.js";import{e as x,o as E}from"./icons.4b27c20b.js";import{_ as D}from"./CrudView.vue_vue_type_script_setup_true_lang.3dfdcdc3.js";import"./passwordlessManager.90d3a316.js";import"./pubsub.c32c984e.js";import"./storage.02df2e1a.js";import"./activeRecord.64153c3d.js";import"./Modal.c4a3eb37.js";import"./Title.38629c7e.js";import"./transButton.389d0ba4.js";import"./index.bd454869.js";import"./Text.8913855c.js";import"./index.353431e1.js";import"./index.da74220a.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]="f50e19a0-a9dc-4e3d-87d6-48dd6073389a",o._sentryDebugIdIdentifier="sentry-dbid-f50e19a0-a9dc-4e3d-87d6-48dd6073389a")}catch{}})();const L=f({__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 d=[{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:p,result:m,refetch:l}=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:y}){r.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:E,label:"Delete",dangerous:!0,async onClick(){await n.delete(),l()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),I(D,{"entity-name":"connector",loading:h(p),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:d,"create-button-text":"Create connector",onCreate:i},null,8,["loading","table"]))}});export{L as default};
//# sourceMappingURL=Connectors.2d3d3437.js.map
