import{d as T,V,W as B,t as C,e as n,c as _,f as e,a as O,g as s,u as D,o as r,h as a,i as o,T as N,x as U,j as F,k as I,m as p,n as P,p as W,q as j,v as q,F as w,_ as E}from"./index-BOEdKJ1D.js";import{u as L}from"./usePageTitle-BkurcLK2.js";import{u as R}from"./usePrefectApi-aFITTZzH.js";const S=p("span",{class:"automation-card__label"},"Trigger",-1),$={class:"automation-card__label"},M=T({__name:"Automation",setup(z){const c=V(),d=D(),f=R(),v=B("automationId"),i=C(f.automations.getAutomation,[v]),t=n(()=>i.response),g=n(()=>{var u;return((u=t.value)==null?void 0:u.name)??""}),h=n(()=>[{text:"Automations",to:c.automations()},{text:g.value}]),y=n(()=>t.value?`Automation: ${t.value.name}`:"Automation");L(y);function b(){d.push(c.automations())}return(u,G)=>{const k=s("p-key-value"),l=s("p-content"),A=s("p-card"),x=s("p-layout-default");return t.value?(r(),_(x,{key:0,class:"automation"},{header:e(()=>[a(o(F),{crumbs:h.value},{actions:e(()=>[a(o(N),{automation:t.value,onUpdate:o(i).refresh},null,8,["automation","onUpdate"]),a(o(U),{automation:t.value,onDelete:b},null,8,["automation"])]),_:1},8,["crumbs"])]),default:e(()=>[a(l,null,{default:e(()=>[a(k,{label:"Description",value:t.value.description},null,8,["value"]),a(l,{secondary:""},{default:e(()=>[S,a(o(I),{trigger:t.value.trigger},null,8,["trigger"])]),_:1}),a(l,{secondary:""},{default:e(()=>[p("span",$,P(o(W)("Action",t.value.actions.length)),1),(r(!0),j(w,null,q(t.value.actions,m=>(r(),_(A,{key:m.id},{default:e(()=>[a(o(E),{action:m},null,8,["action"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})):O("",!0)}}});export{M as default};
//# sourceMappingURL=Automation-CpvLb7-5.js.map
