import{c_ as a,v as u,c$ as d}from"./index-6Jqoo2rk.js";class i extends a{constructor(e){super("popup-peer popup-confirmation",{title:e.titleLangKey,buttons:e.buttons});const n=document.createElement("p");n.classList.add("popup-description"),n.append(u(e.descriptionLangKey,e.descriptionArgs)),this.header.after(n)}static show(e){return new Promise((n,s)=>{let t=!1;const c=d([e.button]),o=c.find(p=>p.isCancel);o.callback=()=>{t||(s(),t=!0)},e.button.callback=()=>{t||(n(),t=!0)};const r=a.createPopup(i,{titleLangKey:e.titleLangKey,descriptionLangKey:e.descriptionLangKey,descriptionArgs:e.descriptionArgs,buttons:c});r.addEventListener("closeAfterTimeout",()=>{t||(s(),t=!0)}),r.show()})}}export{i as S};
//# sourceMappingURL=simpleConfirmation-5BGWRx60.js.map
