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