import{_ as f}from"./ButtonDefault-CzWpVlv6.js";import{r as c,o as y,c as C,a as l,t as b,b as i,y as I,W as v}from"./index-Bb2UEb_P.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={class:"modal__body"},k={class:"list-item__subtitle"},A={class:"modal__accept-form"},B={__name:"ModalWindowAcceptConditionally",props:{data:{type:Object,default:()=>{}}},emits:["modalClose"],setup(o,{emit:d}){const a=o,r=d,_=c(a.data.ContractID||""),p=c(a.data.RowsIDs||""),m=async()=>{const e={ContractID:_.value,RowsIDs:p.value};try{(await I.post(`${v}/API/InvoiceSetConditionally`,e)).data.Status==="Ok"&&s()}catch(t){console.error(t)}};function s(){r("modalClose")}return(e,t)=>{const n=f;return y(),C("div",D,[l("div",k,b(o.data?.AllowConditionallyMessage),1),l("div",A,[i(n,{class:"modal__button",label:"Да",onClick:t[0]||(t[0]=u=>m())}),i(n,{class:"modal__button",label:"Нет",onClick:t[1]||(t[1]=u=>s())})])])}}},x=w(B,[["__scopeId","data-v-b28ac7bf"]]);export{x as default};
