import{_ as v}from"./ButtonDefault-CzWpVlv6.js";import{C as b,r as i,l as S,D as V,o as R,c as k,a as o,b as c}from"./index-Bb2UEb_P.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const C={class:"modal__body"},P={class:"modal__buttons-wrap"},g={__name:"ModalWindowReloadVPS",props:{data:{type:Object,default:()=>{}}},emits:["modalClose"],setup(u,{emit:_}){const e=u,m=_,p=b(),a=i(e.data?.isReloading||""),f=i(e.data?.VPSOrderID||"");function s(){a.value=!0,e.data.onReloadStatusChange(!0),p.VPSReboot({VPSOrderID:f.value}).then(()=>{setTimeout(()=>{n(),a.value=!1,e.data.onReloadStatusChange(!1)},1e3)})}function n(){m("modalClose")}const l=d=>{d.key==="Enter"&&s()};return S(()=>{document.addEventListener("keyup",l)}),V(()=>{document.removeEventListener("keyup",l)}),(d,t)=>{const r=v;return R(),k("div",C,[t[0]||(t[0]=o("div",{class:"list-item__title"},"Перезагрузка виртуального сервера",-1)),t[1]||(t[1]=o("div",{class:"list-item__subtitle"}," Вы уверены, что хотите выполнить перезагрузку виртуального сервера? ",-1)),o("div",P,[c(r,{class:"modal__button yes",label:"Да",onClick:s}),c(r,{class:"modal__button",label:"Нет",onClick:n})])])}}},I=y(g,[["__scopeId","data-v-2476556a"]]);export{I as default};
