import{d as y,ey as f,ex as C,F as _,b as g,u as w,bu as I}from"./registerWidgets.0d6f36c3.js";import{b as h}from"./index.d806a518.js";import"./gateway.b5799c1b.js";import{C as s}from"./connector.d53bbe30.js";import{a as k}from"./asyncComputed.f5c93ddf.js";import{f as x,q as D}from"./icons.0e440585.js";import{C as E}from"./CrudView.7cc5c294.js";import"./passwordlessManager.7ee1fbd9.js";import"./pubsub.c204a78d.js";import"./storage.674259be.js";import"./activeRecord.43bccff7.js";import"./DropdownMenu.1a06a7fe.js";import"./Modal.04b37ba8.js";import"./LoadingIndicator.7f838903.js";import"./lottie.aa3f8e33.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]="17c2f083-beeb-44bc-8c7b-92d7346783b2",o._sentryDebugIdIdentifier="sentry-dbid-17c2f083-beeb-44bc-8c7b-92d7346783b2")}catch{}})();const H=y({__name:"Connectors",setup(o){const n=f(),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 l=[{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:d,refetch:m}=k(()=>s.list(c)),u=_(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=d.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(),m()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),w(E,{"entity-name":"connector",loading:I(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:l,"create-button-text":"Create connector",onCreate:i},null,8,["loading","table"]))}});export{H as default};
//# sourceMappingURL=Connectors.aacf99fe.js.map
