import{d as b,K as C,b as g,t as _,z as s,J as w,H as I}from"./registerWidgets.0e006b6f.js";import{b as h}from"./index.699f7fd0.js";import"./gateway.68890283.js";import{C as i}from"./connector.6f3fc502.js";import{a as k}from"./asyncComputed.62aacf33.js";import{g as x,t as D}from"./icons.6bb7a228.js";import{C as E}from"./CrudView.ce48083b.js";import"./passwordlessManager.4cf24a2b.js";import"./pubsub.13db2123.js";import"./activeRecord.d399634f.js";import"./DropdownMenu.a8ccd533.js";import"./Modal.d54926bb.js";import"./LoadingIndicator.8b9ec224.js";import"./lottie.b974d0b6.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="9af7455d-3469-43ed-b546-306a084556e1",o._sentryDebugIdIdentifier="sentry-dbid-9af7455d-3469-43ed-b546-306a084556e1")}catch{}})();const Y=b({__name:"Connectors",setup(o){const n=w(),r=I(),c=n.params.projectId;async function l(e){const t=await i.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(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:p,result:m,refetch:u}=k(()=>i.list(c)),y=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=m.value)==null?void 0:e.map(a=>({key:a.id,cells:[{text:a.name,classes:["centered"]},{text:a.type},{text:"Actions",classes:["centered"],actions:[{icon:x,label:"Edit",onClick({key:f}){r.push({name:"connectorEditor",params:{connectorId:f}})}},{icon:D,label:"Delete",dangerous:!0,async onClick(){await a.delete(),u()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),_(E,{"entity-name":"connector",loading:s(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:s(y),fields:d,"create-button-text":"Create connector",onCreate:l},null,8,["loading","table"]))}});export{Y as default};
//# sourceMappingURL=Connectors.9c9a18fd.js.map
