import{_ as D}from"./SaveButton.vue_vue_type_script_setup_true_lang.1abdfcbd.js";import{L as x}from"./LoadingContainer.a8c11c78.js";import{C as E,W as b}from"./model.d7c37a50.js";import{E as W}from"./api.b0b5d442.js";import{d as N,r as B,y as L,b as o,eq as c,u as e,c as p,es as y,f as s,w as r,aw as w,e as k,eA as V,cL as v,ak as f,eC as u,eB as G,cr as T,cQ as F,E as M}from"./outputWidgets.f7b80e9f.js";import{w as S}from"./metadata.e0926a4e.js";import{a as U}from"./asyncComputed.bd2b6e70.js";import{U as q}from"./UnsavedChangesHandler.016666b4.js";import{A as H}from"./index.86fdb625.js";import{A as I}from"./index.28e83ea9.js";import"./workspaces.9eccf428.js";import"./runnerData.5347d4ed.js";import"./url.882128c4.js";import"./record.188928bf.js";import"./pubsub.10df5fd2.js";import"./validations.a9770be1.js";import"./string.18a9daee.js";import"./PhArrowSquareOut.vue.f5352ec6.js";import"./index.d7b009c6.js";import"./Badge.c2f08ef0.js";import"./isNumeric.75337b1e.js";import"./index.9a5a7c1a.js";import"./Card.3d001ab8.js";import"./TabPane.7d974707.js";import"./uuid.e5064b5a.js";import"./fetch.1ec4f78f.js";import"./PhCheckCircle.vue.902dac5a.js";import"./PhKanban.vue.34c60c18.js";import"./PhScroll.vue.26add44e.js";import"./PhWebhooksLogo.vue.4f41bfe0.js";import"./ExclamationCircleOutlined.7d0f10bf.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="87e8d6e8-ddd4-4a36-85c8-50d67fa96f82",n._sentryDebugIdIdentifier="sentry-dbid-87e8d6e8-ddd4-4a36-85c8-50d67fa96f82")}catch{}})();const P={key:1,class:"workflow-editor"},Q={class:"workflow-toolbar"},$=["onDragstart"],j=N({__name:"WorkflowEditor",setup(n){const i=B(null),_=L(()=>{var a;return(a=i.value)==null?void 0:a.gui}),g=new W,{result:d,loading:h}=U(()=>b.create(g)),C=(a,m)=>{var l,t;(l=m.dataTransfer)==null||l.setData("type",a),(t=_.value)==null||t.dragstart(a,m)};return(a,m)=>{var l;return o(),c(w,null,[e(h)?(o(),p(x,{key:0})):(o(),c("div",P,[e(d)?(o(),p(E,{key:0,ref_key:"canvasGui",ref:i,model:e(d)},null,8,["model"])):y("",!0),s(e(F),null,{default:r(()=>[k("div",Q,[(o(!0),c(w,null,V(e(S).stages,t=>(o(),p(e(T),{key:t.typeName,placement:"top"},{title:r(()=>[s(e(H),null,{default:r(()=>[s(e(v),null,{default:r(()=>[f(u(t.title),1)]),_:2},1024),s(e(v),{keyboard:""},{default:r(()=>[f(u(t.key),1)]),_:2},1024)]),_:2},1024)]),content:r(()=>[f(u(t.description),1)]),default:r(()=>[k("span",{draggable:"true",onDragstart:A=>C(t.typeName,A)},[(o(),p(G(t.icon),{width:"18",height:"18",class:"toolbar-item"}))],40,$)]),_:2},1024))),128)),s(e(I),{type:"vertical"}),e(d)?(o(),p(D,{key:0,model:e(d),disabled:void 0,type:"primary"},null,8,["model"])):y("",!0)])]),_:1})])),s(q,{"has-changes":(l=e(d))==null?void 0:l.hasChanges()},null,8,["has-changes"])],64)}}});const Ae=M(j,[["__scopeId","data-v-04ada247"]]);export{Ae as default};
//# sourceMappingURL=WorkflowEditor.faefaa5a.js.map
