import{_ as v}from"./ButtonDefault-BIBStZbJ.js";import{_ as b}from"./BasicInput-KlObNzdO.js";import{u as C,r as h,H as k,s as y,c as V,o as g,a,b as _,t as i}from"./index-CmCGXBst.js";import{_ as B}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./component-0WedTVCo.js";const E={class:"modal__body"},M={class:"modal__section"},S={class:"modal__sub-title"},w={class:"modal__button-wrapper"},x={__name:"ModalWindowConfirmContact",props:["data"],emits:["modalClose"],setup(c,{emit:m}){const n=c,r=m,s=C(),o=h("");function l(){s.confirmContact({...n.data,Confirm:o.value}).then(t=>{t.data.Status==="Ok"&&(r("modalClose"),s.fetchUserData())})}const d=t=>{t.key==="Enter"&&l()};return k(()=>{document.addEventListener("keyup",d)}),y(()=>{document.removeEventListener("keyup",d)}),(t,e)=>{const u=b,p=v;return g(),V("div",E,[a("div",M,[e[1]||(e[1]=a("div",{class:"modal__title"},"Введите код подтверждения",-1)),a("div",S,"Отправили "+i(n.data?.Method)+" на «"+i(n.data?.Value)+"»",1),_(u,{class:"modal__input",label:"Код подтверждения",modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=f=>o.value=f),vertical:""},null,8,["modelValue"])]),a("div",w,[_(p,{onClick:l,disabled:!(o.value?.length>0),label:"Подтвердить"},null,8,["disabled"])])])}}},W=B(x,[["__scopeId","data-v-ca6aa19c"]]);export{W as default};
