import{C as e,E as t,Qt as n,W as r,X as i,h as a,m as o,tn as s,v as c}from"./vendor/json-editor-vue-ddj4xtqm.js";var l={"ml-1":``,"text-xs":``,op50:``},u=t({__name:`DurationDisplay`,props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(t){let u=t;function d(e){return u.color?e?(e*=u.factor,e<.5?`text-gray:50`:e>1e3?`text-red-400`:e>500?`text-orange-400`:e>200?`text-yellow-400`:``):`text-gray-400`:``}let f=o(()=>!u.duration||u.duration<1?[`<1`,`ms`]:u.duration<1e3?[u.duration.toFixed(0),`ms`]:u.duration<1e3*60?[(u.duration/1e3).toFixed(1),`s`]:[(u.duration/1e3/60).toFixed(1),`min`]);return(o,u)=>(r(),c(`div`,{class:n(d(t.duration))},[i(o.$slots,`before`),e(` `+s(f.value[0]),1),a(`span`,l,s(f.value[1]),1),i(o.$slots,`after`)],2))}}),d=Object.assign(u,{__name:`DurationDisplay`});export{d as t};