import{d as f,eG as b,eM as C,D as g,b as _,c as h,u as w,eS as I}from"./outputWidgets.7323a17d.js";import{b as k}from"./index.c9f11f2b.js";import"./router.7bb92c0e.js";import{C as i}from"./connector.04b8874d.js";import{a as x}from"./asyncComputed.a50f21d4.js";import{G as D}from"./PhPencil.vue.75024b51.js";import{C as E}from"./CrudView.e2192329.js";import"./record.1f033572.js";import"./pubsub.2c3883f4.js";import"./Form.4d35a934.js";import"./hasIn.adc00278.js";import"./popupNotifcation.4e57751c.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.d07c372f.js";import"./BookOutlined.22bb6522.js";import"./url.50c4a8f0.js";import"./Paragraph.1e67eefb.js";import"./Base.003f7172.js";import"./Modal.8e6a9189.js";import"./index.42443749.js";import"./Title.88a7d0e4.js";import"./Text.a0b69008.js";import"./index.211f7220.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]="7deccccf-8317-44a9-a70f-78bb105ad2df",o._sentryDebugIdIdentifier="sentry-dbid-7deccccf-8317-44a9-a70f-78bb105ad2df")}catch{}})();const Q=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:D,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(E,{"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.5cd104c9.js.map
