import{P as s,$ as a}from"./utils-lib.js?v=1761009159";import{c as e,r as t,q as l,v as n,x as o,z as i,e as m,y as r,Q as u,an as c}from"./base-lib.js?v=1761009159";import{setRestartTask as d,getRestartTask as p}from"./database.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const v={class:"flex items-center"},y=e({__name:"index",setup(e,{expose:y}){const _=t(!1),f=[{content:"守护进程可以在MySQL数据库服务停止后自动启动，保证MySQL服务一直运行。"}],g=async a=>{await s({loading:"正在设置守护进程, 请稍后...",request:d({status:a?1:0}),message:!0,success:()=>j()})},j=async()=>{await s({loading:"正在获取守护进程状态, 请稍后...",request:p(),success:({data:s})=>{_.value=1===s.msg.status}})};return l(j),y({init:j}),(s,e)=>{const t=c,l=a;return n(),o("div",null,[i("div",v,[e[1]||(e[1]=i("div",{class:"mr-4"},"守护进程开关",-1)),m(t,{modelValue:r(_),"onUpdate:modelValue":e[0]||(e[0]=s=>u(_)?_.value=s:null),width:36,onChange:g},null,8,["modelValue"])]),m(l,{options:f,"list-style":"disc",class:"mt-2rem ml-2rem"})])}}});export{y as default};
