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