import{_ as u}from"./ButtonDefault-BIBStZbJ.js";import{_ as p}from"./BlockSelectContract-uyQ-oMQe.js";import{u as f}from"./global-5eUCDNCu.js";import{_ as v}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as b,o as k,a as d,b as _,r as i,H as C,s as y}from"./index-CmCGXBst.js";import"./contracts-P7YPBhEI.js";import"./multiselect-DhoC9bwZ.js";const O={props:{data:{type:Object,default:()=>{}}},emits:["modalClose","buttonClicked"],setup(s,{emit:e}){const a=i(""),t=i(s.data.OrdersTransferID||""),c=f();async function l(){const r={ContractID:a.value,OrdersTransferID:t.value.OrdersTransferID};try{const{result:o,error:m}=await c.OrdersTransfer(r);o==="SUCCESS"?e("modalClose"):console.error("Error:",m)}catch(o){console.error("Error:",o.message)}}const n=r=>{r.key==="Enter"&&l()};return C(()=>{document.addEventListener("keyup",n)}),y(()=>{document.removeEventListener("keyup",n)}),{acceptOrder:l,orderTransferId:t,_contract_select:a}}},E={class:"modal__body"},B={class:"modal__input-row"},I={class:"modal__input-row"};function S(s,e,a,t,c,l){const n=p,r=u;return k(),b("div",E,[e[3]||(e[3]=d("div",{class:"list-item__title"},"Перенос услуги",-1)),d("div",B,[_(n,{modelValue:t._contract_select,"onUpdate:modelValue":e[0]||(e[0]=o=>t._contract_select=o),onButtonClicked:e[1]||(e[1]=o=>s.closeModal())},null,8,["modelValue"])]),d("div",I,[_(r,{class:"modal__button",label:"Сохранить",onClick:e[2]||(e[2]=o=>t.acceptOrder())})])])}const U=v(O,[["render",S],["__scopeId","data-v-4073ebf0"]]);export{U as default};
