import{$ as e,Ir as t,o as n,st as r}from"./i18n-CsN8OUP9.js";import{o as i}from"./notifications-DLwVuo9_.js";var a=18,o=1200,s=180,c=t(!1);async function l(t){for(let r=0;r<a;r+=1){await new Promise(e=>window.setTimeout(e,o));let r=await e(t.name,s);if(!r.running){if(r.exit_code!=null&&r.exit_code!==0)throw Error(n(`commandCenter.gatewayRestartFailed`));return}}}async function u(){c.set(!0);try{await l(await r())}catch(e){i(e,n(`commandCenter.gatewayRestartFailed`))}finally{c.set(!1)}}export{u as n,c as t};