import{d as f,f1 as b,f7 as C,y as g,b as _,c as h,u as w,fd as I}from"./outputWidgets.fb72f334.js";import{b as k}from"./index.6110cacc.js";import"./gateway.9d0e9a56.js";import{C as i}from"./connector.3a8c3609.js";import{a as x}from"./asyncComputed.7ed124a4.js";import{G as E}from"./PhPencil.vue.1a0543c3.js";import{C as D}from"./CrudView.429e2094.js";import"./record.7e471bce.js";import"./pubsub.b6388b69.js";import"./string.8f29ec33.js";import"./popupNotifcation.d53949ca.js";import"./router.775ef26f.js";import"./Form.829a2cd2.js";import"./hasIn.ebbb1eda.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.96c0e5a0.js";import"./BookOutlined.6eee3e13.js";import"./url.14a615f7.js";import"./Modal.082f2dc7.js";import"./index.5b13efd4.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]="a8d263c3-8c05-4cd5-a3c3-2cebc2f987d8",o._sentryDebugIdIdentifier="sentry-dbid-a8d263c3-8c05-4cd5-a3c3-2cebc2f987d8")}catch{}})();const L=f({__name:"Connectors",setup(o){const r=b(),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{L as default};
//# sourceMappingURL=Connectors.e9c13498.js.map
