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