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