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{v as d,yt as f}from"./index-kSn5YXd0.js";import{a as p}from"./admin-monitor-DgL7mwX_.js";var m={class:`flex items-center gap-1.5 text-xs text-zinc-500`},h=a({__name:`MonitorSmoothToggle`,setup(e){let a=f(),h=d(),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-zinc-700 dark:text-zinc-200`:``)},`平滑`,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};