import{d as f,K as C,b as g,t as _,z as s,J as w,H as I}from"./registerWidgets.240bf3ff.js";import{b as h}from"./index.11c237cf.js";import"./gateway.5b5e16cb.js";import{C as i}from"./connector.fbc5e726.js";import{a as k}from"./asyncComputed.e710533c.js";import{g as x,r as D}from"./icons.8dbdad3c.js";import{C as E}from"./CrudView.d6bbee89.js";import"./passwordlessManager.0554ad1a.js";import"./pubsub.83908d54.js";import"./activeRecord.d21ad35a.js";import"./DropdownMenu.2a857e1b.js";import"./Modal.ba42d121.js";import"./LoadingIndicator.8f6b0830.js";import"./lottie.b1d7a5e6.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]="ebd21472-23fc-4ebe-8e0b-c5023837170c",o._sentryDebugIdIdentifier="sentry-dbid-ebd21472-23fc-4ebe-8e0b-c5023837170c")}catch{}})();const Y=f({__name:"Connectors",setup(o){const n=w(),a=I(),c=n.params.projectId;async function l(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:d,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(r=>({key:r.id,cells:[{text:r.name,classes:["centered"]},{text:r.type},{text:"Actions",classes:["centered"],actions:[{icon:x,label:"Edit",onClick({key:b}){a.push({name:"connectorEditor",params:{connectorId:b}})}},{icon:D,label:"Delete",dangerous:!0,async onClick(){await r.delete(),u()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),_(E,{"entity-name":"connector",loading:s(d),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:p,"create-button-text":"Create connector",onCreate:l},null,8,["loading","table"]))}});export{Y as default};
//# sourceMappingURL=Connectors.cd6334ff.js.map
