import{b as n,e as i,l,f as a,c as o,k as p,m as t,r as s,h as c,n as u}from"./vendor-forms-BN3tpxM2.js";const r="UNASSIGNED",y=n({type:t("do-nothing")}),_=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()}),f=n({type:t("run-deployment"),deployment_id:o().or(t(r)),job_variables:s(c()).optional(),parameters:s(c()).optional()}).transform(e=>({...e,...e.deployment_id===r?{source:"inferred",deployment_id:null}:{source:"selected",deployment_id:e.deployment_id}})),w=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}})),g=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}})),k=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}})),h=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}})),T=n({type:t("send-notification"),block_document_id:o(),body:o(),subject:o()}),N=a(["deployment-status","flow-run-state","work-pool-status","work-queue-status","custom"]),E=a(["Reactive","Proactive"]),m=s(p([o(),i(o())])),D=n({type:t("event"),posture:E,threshold:u().min(1).default(1),within:u().min(0).default(0),match:m.optional(),match_related:m.optional(),for_each:i(o()).optional(),after:i(o()).optional(),expect:i(o()).optional()}),d=l(()=>p([D,q,A])),q=l(()=>n({type:t("compound"),triggers:i(d),require:p([u().min(1),t("any"),t("all")]).default("all"),within:u().min(0).default(0)})),A=l(()=>n({type:t("sequence"),triggers:i(d),within:u().min(0).default(0)})),b=n({name:o().min(1,"Name is required"),description:o().optional(),triggerTemplate:N.optional(),trigger:d,actions:i(p([y,S,w,f,k,g,h,T,_]))});export{b as A,d as T,r as U};
//# sourceMappingURL=automation-schema-CK40VptI.js.map
