import{_ as a}from"./index.js?v=1764830988434";import{p as t,_ as e,eQ as s,eR as o,eS as n,eT as r,m as i,P as d,bi as l}from"./page_layout.js?v=1764830988434";import{a as m}from"./public.js?v=1764830988434";import{k as p,R as x,V as c,H as _,S as y,a4 as u,P as v,r as f,W as H,F as R,O as w,a2 as T,U as j,a3 as C,j as h,ak as k}from"./vue.js?v=1764830988434";import{aC as b}from"./naive.js?v=1764830988434";import"./common.js?v=1764830988434";import"./__commonjsHelpers__.js?v=1764830988434";const g=t(p({__name:"info",props:{data:{}},setup:a=>(a,t)=>(c(),x("div",{class:_(["info",a.data.type])},[t[0]||(t[0]=y("div",{class:"mark"},null,-1)),y("div",null,u("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"},S={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(),_=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")}]),C=()=>{setTimeout(async()=>{try{await r(),i.success(p("Home.Restart.index_13")),d()}catch(a){C()}},1e3)};return t({onConfirm:async()=>{m("setConfirm",{loading:!0,disabled:!0});try{await(async()=>{_.value[0].type="load",await s(),_.value[0].type="done"})(),await(async()=>{_.value[1].type="load",await o(),_.value[1].type="done"})(),await(async()=>{_.value[2].type="load",await n(),_.value[2].type="done"})(),await(async()=>{_.value[3].type="load";try{await r()}finally{_.value[3].type="done"}})(),C()}catch(a){_.value.forEach(a=>{a.type="start"}),m("setConfirm",{loading:!1,disabled:!1})}}}),(a,t)=>{const s=e;return c(),x("div",$,[y("div",I,[H(s,{name:"common-ask",size:"17"}),y("span",S,u(a.$t("Home.Restart.index_5")),1)]),y("div",P,u(a.$t("Home.Restart.index_6")),1),y("div",U,[(c(!0),x(R,null,w(j(_),a=>(c(),T(g,{key:a.startText,data:a},null,8,["data"]))),128))])])}}}),[["__scopeId","data-v-61b30d8c"]]),E={class:"flex items-center justify-center h-110px px-30px"},F=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),d(3e3)}})};return(t,e)=>{const r=b,i=a;return c(),x("div",E,[H(r,{type:"primary",onClick:o},{default:C(()=>[h(u(t.$t("Home.Restart.index_1")),1)]),_:1}),H(r,{type:"primary",class:"ml-32px",onClick:n},{default:C(()=>[h(u(t.$t("Home.Restart.index_2")),1)]),_:1}),H(i,{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{F as default};
