import{d as y,ey as b,ex as C,F as _,b as g,u as w,bu as I}from"./registerWidgets.f16d9611.js";import{b as h}from"./index.6bb4a320.js";import"./gateway.a32a48c2.js";import{C as s}from"./connector.8fb3c3a6.js";import{a as k}from"./asyncComputed.5a3fb141.js";import{f as x,q as D}from"./icons.3c1b43b5.js";import{C as E}from"./CrudView.10c4d004.js";import"./passwordlessManager.7fb318b8.js";import"./pubsub.1eec455f.js";import"./storage.9f674036.js";import"./activeRecord.5c8dc9b3.js";import"./DropdownMenu.c1d2d206.js";import"./Modal.4a31ff16.js";import"./LoadingIndicator.83a6b2d1.js";import"./lottie.eab5e6f1.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]="0feff06d-9b4e-4291-8ee0-570d22d60f54",o._sentryDebugIdIdentifier="sentry-dbid-0feff06d-9b4e-4291-8ee0-570d22d60f54")}catch{}})();const H=y({__name:"Connectors",setup(o){const n=b(),a=C(),c=n.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 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:l,result:p,refetch:m}=k(()=>s.list(c)),u=_(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=p.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:f}){a.push({name:"connectorEditor",params:{connectorId:f}})}},{icon:D,label:"Delete",dangerous:!0,async onClick(){await r.delete(),m()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),w(E,{"entity-name":"connector",loading:I(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:d,"create-button-text":"Create connector",onCreate:i},null,8,["loading","table"]))}});export{H as default};
//# sourceMappingURL=Connectors.f5e37464.js.map
