import{_ as u}from"./ButtonDefault-CghIUDY0.js";import{_}from"./BasicInput-BYe5b9L8.js";import{u as c}from"./global-Fil99La8.js";import{_ as p}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as f,o as v,a as b,b as d,r as m,x as g,H as E,s as k}from"./index-CipWZKo_.js";import"./component-DWBAga-C.js";const y={props:{data:{type:Object,default:()=>{}}},emits:["modalClose"],setup(i,{emit:e}){const n=m(""),o=c(),a=m(!1);g("emitter");function l(){n.value.length>3&&(a.value=!0,o.OrdersTransfer({...i.data,Email:n.value}).then(({result:t,error:r})=>{t==="SUCCESS"&&e("modalClose"),a.value=!1}))}const s=t=>{t.key==="Enter"&&l()};return E(()=>{document.addEventListener("keyup",s)}),k(()=>{document.removeEventListener("keyup",s)}),{email:n,isLoading:a,transfer:l}}},x={class:"modal__body"};function C(i,e,n,o,a,l){const s=_,t=u;return v(),f("div",x,[e[2]||(e[2]=b("div",{class:"list-item__title"},"Передача заказа",-1)),d(s,{label:"Почтовый адрес",name:"mailIndex",placeholder:"Email",modelValue:o.email,"onUpdate:modelValue":e[0]||(e[0]=r=>o.email=r)},null,8,["modelValue"]),d(t,{class:"modal__button",label:"Передать","is-loading":o.isLoading,onClick:e[1]||(e[1]=r=>o.transfer())},null,8,["is-loading"])])}const j=p(y,[["render",C],["__scopeId","data-v-8f70238c"]]);export{j as default};
