import{_ as p}from"./ButtonDefault-CzWpVlv6.js";import{e as f,am as b,l as C,D as y,o as k,c as v,a as i,b as d}from"./index-Bb2UEb_P.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={class:"modal__body"},U={class:"modal__buttons"},B={__name:"ModalWindowUnsubscribeConfirmation",props:["data"],emits:["modalClose"],setup(r,{emit:l}){const o=r,m=l,_=f(),u=b();function t(){m("modalClose"),_.push("/Home")}async function e(){await u.confirmUnsubscribe(`ContactID=${o.data?.ContactID}&TypeID=${o.data?.TypeID}&Code=${o.data?.Code}&IsConfirm=1`),t()}const n=s=>{s.key==="Enter"&&e()};return C(()=>{document.addEventListener("keyup",n)}),y(()=>{document.removeEventListener("keyup",n)}),(s,a)=>{const c=p;return k(),v("div",D,[a[0]||(a[0]=i("div",{class:"list-item__title"},"Вы действительно хотите отписаться от уведомлений?",-1)),i("div",U,[d(c,{class:"modal__button",label:"Да",onClick:e}),d(c,{class:"modal__button",label:"Нет",onClick:t})])])}}},g=I(B,[["__scopeId","data-v-d5ff1805"]]);export{g as default};
