import{_ as p}from"./ButtonDefault-BIBStZbJ.js";import{c as m,o as u,a as d,t as f,b as i,r,H as y,s as C,am as v,W as b}from"./index-CmCGXBst.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";const k={props:{data:{type:Object,default:()=>{}}},emits:["modalClose"],setup(n,{emit:t}){const s=r(n.data.ContractID||""),a=r(n.data.RowsIDs||""),l=async()=>{const e={ContractID:s.value,RowsIDs:a.value};try{(await v.post(`${b}/API/InvoiceSetConditionally`,e)).data.Status==="Ok"&&c()}catch{}};function c(){t("modalClose")}const o=e=>{e.key==="Enter"&&addToCart()};return y(()=>{document.addEventListener("keyup",o)}),C(()=>{document.removeEventListener("keyup",o)}),{acceptConditionally:l,close:c}}},w={class:"modal__body"},D={class:"list-item__subtitle"},E={class:"modal__accept-form"};function B(n,t,s,a,l,c){const o=p;return u(),m("div",w,[d("div",D,f(s.data?.AllowConditionallyMessage),1),d("div",E,[i(o,{class:"modal__button",label:"Да",onClick:t[0]||(t[0]=e=>a.acceptConditionally())}),i(o,{class:"modal__button",label:"Нет",onClick:t[1]||(t[1]=e=>a.close())})])])}const h=I(k,[["render",B],["__scopeId","data-v-e10c93bd"]]);export{h as default};
