import{_ as w}from"./ButtonDefault-CzWpVlv6.js";import{_ as v}from"./InputText-B7svPZWH.js";import{u as x,r as C,l as k,D as y,o as g,c as V,a as t,t as i,b as m}from"./index-Bb2UEb_P.js";import{_ as b}from"./_plugin-vue_export-helper-DlAUqK2U.js";const h={class:"tw-flex tw-flex-col tw-justify-between tw-gap-4 tw-max-w-[500px] tw-flex-1"},B={class:"tw-text-gray-500 tw-mt-1"},D={class:"tw-flex tw-items-center tw-gap-4 tw-mt-4"},E={__name:"ModalWindowConfirmContact",props:["data"],emits:["modalClose"],setup(u,{emit:r}){const a=u,c=r,s=x(),o=C("");function l(){s.confirmContact({...a.data,Confirm:o.value}).then(n=>{n.data.Status==="Ok"&&(c("modalClose"),s.fetchUserData())})}const d=n=>{n.key==="Enter"&&l()};return k(()=>{document.addEventListener("keyup",d)}),y(()=>{document.removeEventListener("keyup",d)}),(n,e)=>{const f=v,p=w;return g(),V("div",h,[t("div",null,[e[2]||(e[2]=t("div",{class:"tw-text-2xl tw-font-medium"},"Введите код подтверждения",-1)),t("div",B," Отправили "+i(a.data?.Method)+" на «"+i(a.data?.Value)+"» ",1),t("div",D,[e[1]||(e[1]=t("div",null,"Код подтверждения",-1)),t("div",null,[m(f,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=_=>o.value=_)},null,8,["modelValue"])])])]),t("div",null,[m(p,{disabled:!(o.value?.length>0),label:"Подтвердить",onClick:l},null,8,["disabled"])])])}}},I=b(E,[["__scopeId","data-v-e5e40eea"]]);export{I as default};
