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