import{d as b,eE as f,eK as C,J as g,b as _,c as h,u as w,eS as I}from"./outputWidgets.e32c4de9.js";import{b as k}from"./index.3e2bee12.js";import"./router.d15ff954.js";import{C as i}from"./connector.e4856ae6.js";import{a as x}from"./asyncComputed.cd8e83d5.js";import{G as E}from"./PhPencil.vue.a1ca7028.js";import{C as D}from"./CrudView.7262a743.js";import"./record.f085fb76.js";import"./pubsub.574e50fa.js";import"./Form.6e618181.js";import"./hasIn.e17bd528.js";import"./popupNotifcation.63897623.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.bcdaf646.js";import"./BookOutlined.c9465756.js";import"./url.b82290c2.js";import"./Paragraph.27861c63.js";import"./Base.583225bc.js";import"./Modal.3e62e331.js";import"./index.66b88b11.js";import"./Title.e20804f9.js";import"./Text.81365b40.js";import"./index.5d1f98c6.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="49b7fbe7-ddbb-48f2-a7a2-9d75383690ea",o._sentryDebugIdIdentifier="sentry-dbid-49b7fbe7-ddbb-48f2-a7a2-9d75383690ea")}catch{}})();const Q=b({__name:"Connectors",setup(o){const r=f(),a=C(),c=r.params.projectId;async function s(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(k.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:m,result:d,refetch:l}=x(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=d.value)==null?void 0:e.map(n=>({key:n.id,cells:[{type:"link",text:n.name,to:{name:"connectorEditor",params:{connectorId:n.id}}},{type:"text",text:n.type},{type:"actions",actions:[{icon:E,label:"Edit",onClick({key:y}){a.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:I,label:"Delete",dangerous:!0,async onClick(){await n.delete(),l()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),h(D,{"entity-name":"connector",loading:w(m),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:p,"create-button-text":"Create connector",onCreate:s},null,8,["loading","table"]))}});export{Q as default};
//# sourceMappingURL=Connectors.7f123ffa.js.map
