const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatWindow-7ZbcAeam.js","assets/rolldown-runtime-BM3Ffeng.js","assets/index-DDwwBb9e.js","assets/shiki-BNfJ3iH3.js","assets/src-og71MvX2.js","assets/path-tYResLys.js","assets/array-Bxr4Uw0G.js","assets/step-C3oYTAfB.js","assets/isSymbol-CVAAWvpw.js","assets/posthogErrorCapture-CLTfRKFa.js","assets/index-D68tgUcr.css","assets/useWorkflowStore-BxQNoHq3.js"])))=>i.map(i=>d[i]);
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{qa as t}from"./shiki-BNfJ3iH3.js";import{Gy as n,Hy as r,In as i,Ly as a,Rn as o,Yc as s,ap as c,kp as l,lh as u,pv as d}from"./index-DDwwBb9e.js";var f=e(n()),p=r(),m=s(()=>t(()=>import(`./ChatWindow-7ZbcAeam.js`).then(e=>e.t).then(e=>e.ChatBox),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),{ssr:!1,loading:()=>(0,p.jsx)(i,{})});function h(){let e=l(),{project:t}=c(),n=e.query.workflow,r=u.optimization.getPublishedWorkflow.useQuery({workflowId:n,projectId:t?.id??``},{enabled:!!t?.id&&!!n}),[s,h]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{h(!0)},[]),!s||!e.isReady||r.isLoading?(0,p.jsx)(i,{}):r.data?(0,p.jsx)(a,{height:`100vh`,children:(0,p.jsxs)(a,{height:`full`,bg:`bg.muted`,p:16,pt:4,children:[(0,p.jsx)(o,{}),(0,p.jsx)(d,{height:`90%`,bg:`bg.panel`,p:5,mt:4,children:(0,p.jsx)(m,{useApi:!0,workflowId:n,nodes:r.data.dsl?.nodes,edges:r.data.dsl?.edges})})]})}):(0,p.jsx)(a,{p:8,children:`Workflow not found.`})}function g(){return(0,p.jsx)(h,{})}export{g as default};
//# sourceMappingURL=_workflow_-Bh87tjt2.js.map