import{r as e}from"./rolldown-runtime-BM3Ffeng.js";import{p as t,ut as n}from"./element-plus-vendor-BF9PNysW.js";import{D as r,E as i,I as a,O as o,P as s,et as c,ht as l,qt as u}from"./vue-vendor-DMUmTARL.js";import{lt as d,y as f}from"./index-y6crcKNt.js";import{a as p}from"./admin-monitor-Bvq7GwsD.js";var m={class:`flex items-center gap-1.5 text-xs text-secondary`},h=a({__name:`MonitorSmoothToggle`,setup(e){let a=d(),h=f(),g=i(()=>a.globalConfig.monitorEwmaEnabled??!0),_=async e=>{let t=!!e;try{await p(t),a.globalConfig.monitorEwmaEnabled=t,h.success(t?`已开启曲线平滑`:`已关闭曲线平滑`)}catch(e){console.error(`保存监控平滑设置失败:`,e)}};return(e,i)=>{let a=t,d=n;return c(),o(d,{placement:`top`,content:`平滑曲线显示，弱化数据抖动`},{default:l(()=>[r(`span`,m,[r(`span`,{class:u(g.value?`text-regular`:``)},`平滑`,2),s(a,{"model-value":g.value,size:`small`,onChange:_},null,8,[`model-value`])])]),_:1})}}}),g=e({default:()=>_}),_=h;export{g as n,_ as t};