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