import{t as e}from"./jsx-runtime-B6e-FjZo.js";import{Ar as t,Ht as n,Sr as r,s as i}from"./app-figJB8d1.js";import{WorkflowForm as a}from"./workflow-form-BhRqQ7vv.js";var o=t(),s=e();function c(e){let t=(0,o.c)(39),{agents:c}=e,{t:l}=n(),u;t[0]===l?u=t[1]:(u=l(`Workflows`),t[0]=l,t[1]=u);let d;t[2]===u?d=t[3]:(d={title:u,href:`/app/workflows`},t[2]=u,t[3]=d);let f;t[4]===l?f=t[5]:(f=l(`New`),t[4]=l,t[5]=f);let p;t[6]===f?p=t[7]:(p={title:f,href:`/app/workflows/create`},t[6]=f,t[7]=p);let m;t[8]!==d||t[9]!==p?(m=[d,p],t[8]=d,t[9]=p,t[10]=m):m=t[10];let h=m,g;t[11]===l?g=t[12]:(g=l(`New workflow`),t[11]=l,t[12]=g);let _;t[13]===g?_=t[14]:(_=(0,s.jsx)(r,{title:g}),t[13]=g,t[14]=_);let v;t[15]===l?v=t[16]:(v=l(`New workflow`),t[15]=l,t[16]=v);let y;t[17]===v?y=t[18]:(y=(0,s.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:v}),t[17]=v,t[18]=y);let b;t[19]===l?b=t[20]:(b=l(`Save as Draft to keep editing, or Active to start firing on matching visitor messages.`),t[19]=l,t[20]=b);let x;t[21]===b?x=t[22]:(x=(0,s.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:b}),t[21]=b,t[22]=x);let S;t[23]!==x||t[24]!==y?(S=(0,s.jsxs)(`div`,{children:[y,x]}),t[23]=x,t[24]=y,t[25]=S):S=t[25];let C;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(C={name:``,status:`draft`,agent_id:null,trigger_kind:`on_keyword`,keywords:[],steps:[]},t[26]=C):C=t[26];let w;t[27]===l?w=t[28]:(w=l(`Create workflow`),t[27]=l,t[28]=w);let T;t[29]!==c||t[30]!==w?(T=(0,s.jsx)(a,{initial:C,method:`post`,action:`/app/workflows`,submitLabel:w,agents:c}),t[29]=c,t[30]=w,t[31]=T):T=t[31];let E;t[32]!==S||t[33]!==T?(E=(0,s.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4 p-4`,children:[S,T]}),t[32]=S,t[33]=T,t[34]=E):E=t[34];let D;return t[35]!==h||t[36]!==E||t[37]!==_?(D=(0,s.jsxs)(i,{breadcrumbs:h,children:[_,E]}),t[35]=h,t[36]=E,t[37]=_,t[38]=D):D=t[38],D}export{c as default};