import{L as x}from"./LoadingContainer.e5c3dbdf.js";import{S as D}from"./SaveButton.af01b96f.js";import{C as h,W as A}from"./model.da0c1dc1.js";import{E as C}from"./api.1f95d268.js";import{d as W,e as E,f as N,u as t,c as n,W as _,R as y,b as d,w as e,o as r,a as w,aJ as B,e9 as S,d4 as k,ax as m,e6 as f,ea as V,cH as G,d9 as L,$ as T}from"./vue-router.2175af64.js";import{w as F}from"./metadata.8dc4f573.js";import{a as M}from"./asyncComputed.bdf01236.js";import{A as H}from"./index.0d626be8.js";import{A as I}from"./index.4ae79fe4.js";import"./ExclamationCircleOutlined.1f0dc6e9.js";import"./workspaces.dcc68357.js";import"./workspaceStore.d0364043.js";import"./url.bfee0c48.js";import"./record.702887f1.js";import"./validations.274ecf1b.js";import"./string.091ba4d2.js";import"./PhArrowSquareOut.vue.5299d2c7.js";import"./index.5018ca60.js";import"./Badge.7bbd0ef6.js";import"./isNumeric.75337b1e.js";import"./index.db580684.js";import"./Card.e8e29a1c.js";import"./TabPane.ecb5d5c2.js";import"./uuid.84c098a7.js";import"./fetch.332d7953.js";import"./PhBug.vue.03b8d41c.js";import"./PhCheckCircle.vue.5f84018f.js";import"./PhKanban.vue.2e9223b7.js";import"./PhWebhooksLogo.vue.39736b9f.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="b87b76db-25cc-4bbb-9321-74dbc3aa84f2",s._sentryDebugIdIdentifier="sentry-dbid-b87b76db-25cc-4bbb-9321-74dbc3aa84f2")}catch{}})();const J={key:1,class:"workflow-editor"},P={class:"workflow-toolbar"},R=["onDragstart"],$=W({__name:"WorkflowEditor",setup(s){const i=E(null),u=N(()=>{var a;return(a=i.value)==null?void 0:a.gui}),b=new C,{result:l,loading:v}=M(()=>A.create(b)),g=(a,c)=>{var o,p;(o=c.dataTransfer)==null||o.setData("type",a),(p=u.value)==null||p.dragstart(a,c)};return(a,c)=>t(v)?(r(),n(x,{key:0})):(r(),_("div",J,[t(l)?(r(),n(h,{key:0,ref_key:"canvasGui",ref:i,model:t(l)},null,8,["model"])):y("",!0),d(t(L),null,{default:e(()=>[w("div",P,[(r(!0),_(B,null,S(t(F).stages,o=>(r(),n(t(G),{key:o.typeName,placement:"top"},{title:e(()=>[d(t(H),null,{default:e(()=>[d(t(k),null,{default:e(()=>[m(f(o.title),1)]),_:2},1024),d(t(k),{keyboard:""},{default:e(()=>[m(f(o.key),1)]),_:2},1024)]),_:2},1024)]),content:e(()=>[m(f(o.description),1)]),default:e(()=>[w("span",{draggable:"true",onDragstart:p=>g(o.typeName,p)},[(r(),n(V(o.icon),{width:"18",height:"18",class:"toolbar-item"}))],40,R)]),_:2},1024))),128)),d(t(I),{type:"vertical"}),t(l)?(r(),n(D,{key:0,model:t(l),disabled:void 0,type:"primary"},null,8,["model"])):y("",!0)])]),_:1})]))}});const bt=T($,[["__scopeId","data-v-de9c06f6"]]);export{bt as default};
//# sourceMappingURL=WorkflowEditor.5d88ffa3.js.map
