import{d as f,eE as b,eK as C,J as g,b as _,c as h,u as w,eS as I}from"./outputWidgets.7dd23d3d.js";import{b as k}from"./index.c33cd5e4.js";import"./router.55ae8196.js";import{C as i}from"./connector.cf2f823a.js";import{a as x}from"./asyncComputed.8f047c40.js";import{G as E}from"./PhPencil.vue.a435f271.js";import{C as D}from"./CrudView.5a4776e3.js";import"./record.4544f931.js";import"./pubsub.692bcdfa.js";import"./Form.9f41d3b4.js";import"./hasIn.7d5dcda7.js";import"./popupNotifcation.f54fc99f.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.e5b6cc98.js";import"./BookOutlined.ecab59cc.js";import"./url.6301f7e9.js";import"./Paragraph.7df229fc.js";import"./Base.4bf9624b.js";import"./Modal.5fb5fcda.js";import"./index.8d63ab0d.js";import"./Title.0952eb37.js";import"./Text.8f0caa1d.js";import"./index.a5cb16ca.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]="cee22bef-4703-4ef6-a19e-eb7d90af75a8",o._sentryDebugIdIdentifier="sentry-dbid-cee22bef-4703-4ef6-a19e-eb7d90af75a8")}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:l,refetch:d}=x(()=>i.list(c)),u=g(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"",align:"right"}],rows:(t=(e=l.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(),d()}}]}]})))!=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.3d188cb1.js.map
