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