import{o as n,a as i,k as u,s as o,l as s,m as t,b as y,e as a,r as p,u as d,n as l}from"./vendor-forms-Buh7U8Ay.js";const r="UNASSIGNED",_=n({type:t("do-nothing")}),f=n({type:a(["cancel-flow-run","suspend-flow-run","resume-flow-run"])}),S=n({type:t("change-flow-run-state"),state:a(["COMPLETED","RUNNING","SCHEDULED","PENDING","FAILED","CANCELLED","CANCELLING","CRASHED","PAUSED"]),name:o().optional(),message:o().optional(),force:y().optional()}).transform(e=>({...e,force:e.force??!1})),w=n({type:t("run-deployment"),deployment_id:o().or(t(r)),job_variables:p(d()).optional(),parameters:p(d()).optional()}).transform(e=>({...e,...e.deployment_id===r?{source:"inferred",deployment_id:null}:{source:"selected",deployment_id:e.deployment_id}})),g=n({type:a(["pause-deployment","resume-deployment"]),deployment_id:o().or(t(r))}).transform(e=>({type:e.type,...e.deployment_id===r?{source:"inferred",deployment_id:null}:{source:"selected",deployment_id:e.deployment_id}})),k=n({type:a(["pause-work-queue","resume-work-queue"]),work_queue_id:o().or(t(r))}).transform(e=>({type:e.type,...e.work_queue_id===r?{source:"inferred",work_queue_id:null}:{source:"selected",work_queue_id:e.work_queue_id}})),h=n({type:a(["pause-work-pool","resume-work-pool"]),work_pool_id:o().or(t(r))}).transform(e=>({type:e.type,...e.work_pool_id===r?{source:"inferred",work_pool_id:null}:{source:"selected",work_pool_id:e.work_pool_id}})),T=n({type:a(["pause-automation","resume-automation"]),automation_id:o().or(t(r))}).transform(e=>({type:e.type,...e.automation_id===r?{source:"inferred",automation_id:null}:{source:"selected",automation_id:e.automation_id}})),N=n({type:t("send-notification"),block_document_id:o(),body:o(),subject:o()}),E=n({type:t("call-webhook"),block_document_id:o(),payload:o()}),D=a(["deployment-status","flow-run-state","work-pool-status","work-queue-status","custom"]),b=a(["Reactive","Proactive"]),m=p(u([o(),i(o())])),q=n({type:t("event"),posture:b,threshold:l().min(1).default(1),within:l().min(0).default(0),match:m.optional(),match_related:m.optional(),for_each:i(o()).optional(),after:i(o()).optional(),expect:i(o()).optional()}),c=s(()=>u([q,A,C])),A=s(()=>n({type:t("compound"),triggers:i(c),require:u([l().min(1),t("any"),t("all")]).default("all"),within:l().min(0).default(0)})),C=s(()=>n({type:t("sequence"),triggers:i(c),within:l().min(0).default(0)})),R=n({name:o().min(1,"Name is required"),description:o().optional(),triggerTemplate:D.optional(),trigger:c,actions:i(u([_,S,g,w,h,k,T,N,E,f]))});export{R as A,c as T,r as U};
//# sourceMappingURL=automation-schema-DnZvg-v_.js.map
