import{_ as a}from"./index.js?v=1753954525509";import{e as t,_ as e,dM as s,dN as o,dO as n,dP as r,m as d,K as i,aD as l}from"./page_layout.js?v=1753954525509";import{d as m}from"./public.js?v=1753954525509";import{k as p,U as x,V as c,W as y,a3 as _,H as u,P as v,r as f,Q as H,F as R,O as w,a1 as T,X as j,a2 as h,j as C,ah as k}from"./vue.js?v=1753954525509";import{ay as b}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const g=t(p({__name:"info",props:{data:{}},setup:a=>(a,t)=>(x(),c("div",{class:u(["info",a.data.type])},[t[0]||(t[0]=y("div",{class:"mark"},null,-1)),y("div",null,_("start"===a.data.type?a.data.startText:a.data.loadText+"..."),1)],2))}),[["__scopeId","data-v-186f04ad"]]),$={class:"w-466px p-16px text-[#555]"},I={class:"flex items-center text-error"},O={class:"ml-8px leading-17px"},P={class:"my-10px leading-26px"},U={class:"safe-restart"},z=t(p({__name:"index",emits:["setConfirm"],setup(a,{expose:t,emit:l}){const m=l,{t:p}=v(),u=f([{type:"start",startText:p("Home.Restart.index_7"),loadText:p("Home.Restart.index_8")},{type:"start",startText:p("Home.Restart.index_9"),loadText:p("Home.Restart.index_10")},{type:"start",startText:p("Home.Restart.index_11"),loadText:p("Home.Restart.index_11")},{type:"start",startText:p("Home.Restart.index_12"),loadText:p("Home.Restart.index_12")}]),h=()=>{setTimeout((async()=>{try{await r(),d.success(p("Home.Restart.index_13")),i()}catch(a){h()}}),1e3)};return t({onConfirm:async()=>{m("setConfirm",{loading:!0,disabled:!0});try{await(async()=>{u.value[0].type="load",await s(),u.value[0].type="done"})(),await(async()=>{u.value[1].type="load",await o(),u.value[1].type="done"})(),await(async()=>{u.value[2].type="load",await n(),u.value[2].type="done"})(),await(async()=>{u.value[3].type="load";try{await r()}finally{u.value[3].type="done"}})(),h()}catch(a){u.value.forEach((a=>{a.type="start"})),m("setConfirm",{loading:!1,disabled:!1})}}}),(a,t)=>{const s=e;return x(),c("div",$,[y("div",I,[H(s,{name:"common-ask",size:"17"}),y("span",O,_(a.$t("Home.Restart.index_5")),1)]),y("div",P,_(a.$t("Home.Restart.index_6")),1),y("div",U,[(x(!0),c(R,null,w(j(u),(a=>(x(),T(g,{key:a.startText,data:a},null,8,["data"])))),128))])])}}}),[["__scopeId","data-v-61b30d8c"]]),D={class:"flex items-center justify-center h-110px px-30px"},E=t(p({__name:"index",setup(t){const{t:e}=v(),s=f(!1),o=()=>{s.value=!0},n=()=>{m({title:e("Home.Restart.index_3"),content:e("Home.Restart.index_4"),onConfirm:async()=>{await l(!0),i(3e3)}})};return(t,e)=>{const r=b,d=a;return x(),c("div",D,[H(r,{type:"primary",onClick:o},{default:h((()=>[C(_(t.$t("Home.Restart.index_1")),1)])),_:1}),H(r,{type:"primary",class:"ml-32px",onClick:n},{default:h((()=>[C(_(t.$t("Home.Restart.index_2")),1)])),_:1}),H(d,{show:j(s),"onUpdate:show":e[0]||(e[0]=a=>k(s)?s.value=a:null),title:"Safely reboot server",footer:!0,component:z},null,8,["show"])])}}}),[["__scopeId","data-v-d341a5a3"]]);export{E as default};
