import{L as x}from"./LoadingContainer.2db3b04b.js";import{S as D}from"./SaveButton.059d284d.js";import{C as h,W as A}from"./model.68eb123f.js";import{E as C}from"./api.cd4d7211.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 o,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.c536fc2b.js";import{w as F}from"./metadata.31121f20.js";import{a as M}from"./asyncComputed.5fa11bed.js";import{A as H}from"./index.a489f9a1.js";import{A as I}from"./index.b164e453.js";import"./ExclamationCircleOutlined.ac1b2cd8.js";import"./workspaces.c51223c1.js";import"./workspaceStore.85cfb2dd.js";import"./url.4c149b5f.js";import"./record.f45db9bc.js";import"./validations.411fbd4b.js";import"./string.faa727da.js";import"./PhArrowSquareOut.vue.1fe7be75.js";import"./index.9f298178.js";import"./Badge.757c65b1.js";import"./isNumeric.75337b1e.js";import"./index.b2537806.js";import"./Card.7a2cefaf.js";import"./TabPane.373d8ad5.js";import"./uuid.43c495fc.js";import"./fetch.f9fa5060.js";import"./PhBug.vue.96f8bd7a.js";import"./PhCheckCircle.vue.f717448d.js";import"./PhKanban.vue.718d6f52.js";import"./PhWebhooksLogo.vue.f166a38b.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]="1c11b936-1677-4ee0-b160-32e8d151bcfa",s._sentryDebugIdIdentifier="sentry-dbid-1c11b936-1677-4ee0-b160-32e8d151bcfa")}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}),v=new C,{result:l,loading:b}=M(()=>A.create(v)),g=(a,c)=>{var e,p;(e=c.dataTransfer)==null||e.setData("type",a),(p=u.value)==null||p.dragstart(a,c)};return(a,c)=>t(b)?(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:o(()=>[w("div",P,[(r(!0),_(B,null,S(t(F).stages,e=>(r(),n(t(G),{key:e.typeName,placement:"top"},{title:o(()=>[d(t(H),null,{default:o(()=>[d(t(k),null,{default:o(()=>[m(f(e.title),1)]),_:2},1024),d(t(k),{keyboard:""},{default:o(()=>[m(f(e.key),1)]),_:2},1024)]),_:2},1024)]),content:o(()=>[m(f(e.description),1)]),default:o(()=>[w("span",{draggable:"true",onDragstart:p=>g(e.typeName,p)},[(r(),n(V(e.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 vt=T($,[["__scopeId","data-v-de9c06f6"]]);export{vt as default};
//# sourceMappingURL=WorkflowEditor.445bf568.js.map
