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