import{d as f,b as x,e as l,w as n,j as r,f as t,J as y,K as h,L as C,E as d,M as b,D as i,Q as T,l as e,s as c,F as k,y as H,W as L,_ as v}from"./DrjE4E2T.js";import{A as w}from"./CNBo3Qsw.js";import{u as N,g as B,a as D}from"./T09L0pCq.js";const M={key:0,class:"w-full border-b"},S=["onClick"],V={class:"px-2"},A={class:"font-semibold"},E={class:"p-1"},F={class:"block w-fit rounded bg-muted px-2 py-1 font-mono text-xs font-semibold"},$={class:"scale-75 truncate opacity-50"},j=["innerHTML"],J={key:1,class:"py-8 text-center text-sm text-muted-foreground"},z=f({__name:"index",setup(K){const{scripts:m}=N(),_=o=>new w().toHtml(o.trim());return(o,s)=>{const g=v;return l(),x(g,{name:"default",path:["Logs"]},{default:n(()=>[r(t(y),null,{default:n(()=>[r(t(h),null,{default:n(()=>[r(t(C),null,{default:n(()=>s[0]||(s[0]=[d("Logs")])),_:1}),r(t(b),null,{default:n(()=>[d(i(t(m).length)+" scripts are currently running.",1)]),_:1})]),_:1}),r(t(T),{class:"px-0"},{default:n(()=>[e("p",null,i(o.logsMap),1),t(m).length>0?(l(),c("table",M,[e("tbody",null,[(l(!0),c(k,null,H(t(m),a=>{var u,p;return l(),c("tr",{class:"cursor-pointer border-t hover:bg-accent/50",onClick:Q=>("navigateTo"in o?o.navigateTo:t(L))(`/logs/${a.id}`)},[e("td",V,[e("p",A,i(t(B)({dynamic:a.command})),1)]),e("td",E,[e("code",F,i(t(D)({dynamic:a.command},"packages/ui")),1)]),e("td",null,[e("pre",$,[s[1]||(s[1]=d("                  ")),e("code",{innerHTML:(p=_(((u=a.logs[a.logs.length-1])==null?void 0:u.text)??""))==null?void 0:p.slice(0,240)},null,8,j),s[2]||(s[2]=d(`
                `))])])],8,S)}),256))])])):(l(),c("p",J,"Run a command and it'll appear here."))]),_:1})]),_:1})]),_:1})}}});export{z as default};
