import{_ as m}from"./RecursiveComponent-CPj2bd8j.js";import{u as d}from"./invoices-F361lW0u.js";import{A as _,e as u,r as p,l as v,az as f,ak as I,o as h,c as w,a as y,b as S}from"./index-Bb2UEb_P.js";import{_ as b}from"./_plugin-vue_export-helper-DlAUqK2U.js";const k={class:"tw-overflow-y-auto tw-mt-6 md:tw-mt-0 modal__body"},A={id:"html-container",class:"html__container"},D={__name:"ModalWindowInvoiceDocument",props:{data:{type:Object,default:()=>{}}},setup(a){const t=a,n=_("emitter"),s=d(),c=u(),e=p(null);let o=null;async function r(){(await s.fetchInvoice(t.data.ID)).data.StatusID==="Payed"&&(n.emit("close-modal"),c.push("/Invoices"))}return v(()=>{e.value=t.data.html,o=setInterval(r,f)}),I(()=>{clearInterval(o)}),(i,M)=>{const l=m;return h(),w("div",k,[y("div",A,[S(l,{data:e.value},null,8,["data"])])])}}},E=b(D,[["__scopeId","data-v-02053ebc"]]);export{E as default};
