import{e as j,N as q,f as A,s as o,ai as E,C as N,E as T,I as V,j as F,r as x,y as z,o as m,c as v,d as n,a as g,u as a,A as w,ac as $,t as M,n as U,k,p as G,b as H}from"./vendor.fa0ef14c.js";import{_ as J,A as h,E as I}from"./index.87e553a1.js";const K=r=>(G("data-v-3ae0e22e"),r=r(),H(),r),L={class:"text-truncate"},O={class:"ml-5"},Q=k(" Flow Version: "),W={key:0,class:"font-weight-semibold"},X={key:1,class:"font-weight-semibold"},Y=K(()=>n("i",{class:"pi pi-link pi-xs"},null,-1)),Z=k(" Copy Run ID "),ee=[Y,Z],se=j({async setup(r){let l,b;const s=q(),R=A(null),c=o(()=>s==null?void 0:s.params.id),B=o(()=>({id:c.value})),i=([l,b]=E(()=>h.query({endpoint:I.flow_run,body:B,options:{pollInterval:5e3}}).fetch()),l=await l,b(),l),C=o(()=>({id:i.response.value.flow_id})),y={flow:h.query({endpoint:I.flow,body:C})},P=o(()=>{var e;return((e=y.flow.response)==null?void 0:e.value)||{}}),p=o(()=>{var e;return((e=i.response)==null?void 0:e.value)||{}}),D=o(()=>{var d,t;const e=[{text:(d=P.value)==null?void 0:d.name},{text:(t=p.value)==null?void 0:t.name,to:""}],f=s.fullPath.includes("/timeline"),u=s.fullPath.includes("/radar");return(f||u)&&(e[1].to=`/flow-run/${c.value}`,f&&e.push({text:"Timeline"}),u&&e.push({text:"Radar"})),e}),_=N(),S=()=>{navigator.clipboard.writeText(c.value),_==null||_.appContext.config.globalProperties.$toast.add({type:"success",content:"Run ID was copied to clipboard"})};return T(()=>{i.stopPolling(),h.queries.delete(i.id)}),V(()=>{var e;R.value=((e=s.hash)==null?void 0:e.substr(1))||"task_runs"}),F(c,()=>{y.flow.fetch()}),(e,f)=>{const u=x("bread-crumbs"),d=x("router-view"),t=z("breakpoints");return m(),v("div",null,[n("div",{class:U(["d-flex align-center justify-space-between mb-2 py-1 position-relative z-1",{blur:a(s).fullPath.includes("/radar")}])},[g(u,{class:"flex-grow-1",crumbs:a(D),icon:"pi-flow-run"},null,8,["crumbs"]),w(n("div",L,[w(n("span",O,[Q,a(p).flow_version?(m(),v("span",X,M(a(p).flow_version),1)):(m(),v("span",W," -- "))],512),[[t,"sm"]]),w(n("button",{class:"copy-link ml-1",onClick:S},ee,512),[[t,"md"]])],512),[[t,"sm"],[$,a(s).fullPath.includes("/radar")]])],2),g(d)])}}});var ne=J(se,[["__scopeId","data-v-3ae0e22e"]]);export{ne as default};
