import{d as f,eA as b,eI as C,H as g,b as _,c as I,u as h,eP as w}from"./outputWidgets.3681a2a5.js";import{b as k}from"./index.63f126f8.js";import"./router.ef5c7692.js";import{C as i}from"./connector.47ef8327.js";import{a as x}from"./asyncComputed.317e87c5.js";import{G as E}from"./PhPencil.vue.224ce5e0.js";import{C as D}from"./CrudView.b5e99bd9.js";import"./index.cf4c23b9.js";import"./record.220fa006.js";import"./pubsub.916b1e4d.js";import"./Form.c15ea82d.js";import"./hasIn.127ddf2a.js";import"./popupNotifcation.d8032226.js";import"./Paragraph.326f3875.js";import"./Text.1bf2a6e4.js";import"./Modal.7229d3ef.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.b3245b51.js";import"./BookOutlined.2d246e57.js";import"./url.ec571b6b.js";import"./index.4f6b4519.js";import"./Title.142e78f1.js";import"./index.f44ff305.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]="27f275d4-f185-4e2c-9e86-8cb800afb8d4",o._sentryDebugIdIdentifier="sentry-dbid-27f275d4-f185-4e2c-9e86-8cb800afb8d4")}catch{}})();const S=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:w,label:"Delete",dangerous:!0,async onClick(){await n.delete(),d()}}]}]})))!=null?t:[]}});return(e,t)=>(_(),I(D,{"entity-name":"connector",loading:h(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{S as default};
//# sourceMappingURL=Connectors.dec690e5.js.map
