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