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