import{d as B,V as C,W as D,e as N,f as n,c as _,i as e,a as T,j as s,u as W,o as l,k as a,l as o,m as I,v as K,K as P,n as d,y as U,t as j,p as q,q as w,x as z,z as E,A as F}from"./index-BBlvj0M_.js";import{u as L}from"./usePageTitle-lBdMRcrQ.js";import{u as R}from"./usePrefectApi-Boduij1X.js";import"./api-D3LJrWSC.js";import"./mapper-DWfgs_2K.js";const S={class:"automation-card__label"},Q=B({__name:"Automation",setup($){const c=C(),f=W(),v=R(),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");L(b);function k(){f.push(c.automations())}return(u,m)=>{const x=s("p-key-value"),r=s("p-content"),h=s("p-card"),V=s("p-layout-default");return t.value?(l(),_(V,{key:0,class:"automation"},{header:e(()=>[a(o(P),{crumbs:A.value},{actions:e(()=>[a(o(I),{automation:t.value,onUpdate:o(i).refresh},null,8,["automation","onUpdate"]),a(o(K),{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(U),{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(),_(h,{key:p.id},{default:e(()=>[a(o(F),{action:p},null,8,["action"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})):T("",!0)}}});export{Q as default};
//# sourceMappingURL=Automation-CyH05E0H.js.map
