import{_ as v}from"./ButtonDefault-CzWpVlv6.js";import{_ as b}from"./BasicInput-BG-lQkv5.js";import{u as g}from"./global-BK91p1BE.js";import{_ as E}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{r,l as k,D as y,o as C,c as S,a as V,b as d}from"./index-Bb2UEb_P.js";import"./component-C-Q4t0gB.js";import"./common-U_VzDrmL.js";const x={class:"modal__body"},B={__name:"ModalWindowOrdersTransfer",props:{data:{type:Object,default:()=>{}}},emits:["modalClose"],setup(i,{emit:m}){const u=i,p=m,o=r(""),_=g(),a=r(!1);function n(){o.value.length>3&&(a.value=!0,_.OrdersTransfer({...u.data,Email:o.value}).then(({result:t})=>{t==="SUCCESS"&&p("modalClose"),a.value=!1}))}const l=t=>{t.key==="Enter"&&n()};return k(()=>{document.addEventListener("keyup",l)}),y(()=>{document.removeEventListener("keyup",l)}),(t,e)=>{const c=b,f=v;return C(),S("div",x,[e[2]||(e[2]=V("div",{class:"list-item__title"},"Передача заказа",-1)),d(c,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=s=>o.value=s),label:"Почтовый адрес",name:"mailIndex",placeholder:"Email"},null,8,["modelValue"]),d(f,{class:"modal__button",label:"Передать","is-loading":a.value,onClick:e[1]||(e[1]=s=>n())},null,8,["is-loading"])])}}},N=E(B,[["__scopeId","data-v-d02d16d2"]]);export{N as default};
