import{_ as h}from"./ButtonDefault-CzWpVlv6.js";import{_ as A}from"./BasicInput-BG-lQkv5.js";import{r as d,N as D,v as S,l as b,D as y,o as g,c as k,a as m,t as B,b as r}from"./index-Bb2UEb_P.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./component-C-Q4t0gB.js";import"./common-U_VzDrmL.js";const C={class:"modal__body"},E={class:"list-item__title"},V={class:"tw-mt-6"},L={__name:"ModalWindowSendAuthInfo",props:{data:{type:Object,default:()=>({})}},emits:["modalClose"],setup(s,{emit:c}){const n=s,_=c,a=d(!1),e=d(n.data?.AuthInfo||""),p=D();S(()=>n.data?.AuthInfo,t=>{e.value=!t||t==="IsNotSetByUser"?"":t},{immediate:!0});function f(){_("modalClose")}function l(){a.value=!0;const t={DomainOrderID:n.data?.DomainOrderID,AuthInfo:e.value};p.DomainAuthInfoInput(t).then(o=>{o==="SUCCESS"&&f(),a.value=!1})}const i=t=>{t.key==="Enter"&&l()};return b(()=>{document.addEventListener("keyup",i)}),y(()=>{document.removeEventListener("keyup",i)}),(t,o)=>{const v=A,I=h;return g(),k("div",C,[m("div",E,"Перенос домена "+B(s.data?.Domain),1),m("div",V,[r(v,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=u=>e.value=u),label:"Код переноса домена (AuthInfo)",name:"AuthInfo"},null,8,["modelValue"])]),r(I,{class:"modal__button",label:"Изменить","is-loading":a.value,onClick:o[1]||(o[1]=u=>l())},null,8,["is-loading"])])}}};export{L as default};
