import{k as i,l as u,Q as d,S as f,V as o,a6 as l,a5 as a,U as p,Y as c}from"./vendor/json-editor-vue-fw81xiot.js";const m={"ml-1":"","text-xs":"",op50:""},g=i({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(n){const t=n;function s(e){return t.color?e?(e=e*t.factor,e<.5?"text-gray:50":e>1e3?"text-red-400":e>500?"text-orange-400":e>200?"text-yellow-400":""):"text-gray-400":""}const r=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(e,x)=>(d(),f("div",{class:c(s(e.duration))},[o(e.$slots,"before"),l(" "+a(r.value[0]),1),p("span",m,a(r.value[1]),1),o(e.$slots,"after")],2))}});export{g as _};
