import{_ as v}from"./ButtonDefault-CghIUDY0.js";import{_ as f}from"./BlockSelectContract-3ekz5W0S.js";import{x as b,d as g,H as k,s as C,c as B,o as w,a as n,b as l}from"./index-CipWZKo_.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./contracts-CILh9uSu.js";import"./multiselect-DWCHRlfT.js";const V={class:"modal__body"},$={class:"modal__input-row"},E={class:"modal__btn-group"},M={__name:"ModalWindowNewInvoice",emits:["modalClose","buttonClicked"],setup(N,{emit:c}){const s=c,_=b("emitter"),m=g();function r(){_.emit("open-modal",{component:"AcceptCreateProfile"})}function a(e){m.push(`/Balance/${e}`),s("modalClose")}function u(){s("modalClose")}const i=e=>{e.key==="Enter"&&a(_contract_select.value)};return k(()=>{document.addEventListener("keyup",i)}),C(()=>{document.removeEventListener("keyup",i)}),(e,o)=>{const p=f,d=v;return w(),B("div",V,[o[4]||(o[4]=n("div",{class:"list-item__title"},"Новый счёт",-1)),n("div",$,[l(p,{modelValue:e._contract_select,"onUpdate:modelValue":o[0]||(o[0]=t=>e._contract_select=t),onButtonClicked:o[1]||(o[1]=t=>u())},null,8,["modelValue"])]),n("div",E,[l(d,{class:"select-contract__button modal__button",label:"Создать новый профиль",onClick:o[2]||(o[2]=t=>r())}),l(d,{class:"modal__button",label:"Выписать новый счёт",disabled:e._contract_select===null,"is-loading":e._is_button_loading,onClick:o[3]||(o[3]=t=>a(e._contract_select))},null,8,["disabled","is-loading"])])])}}},j=y(M,[["__scopeId","data-v-8cef437d"]]);export{j as default};
