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