document.addEventListener("DOMContentLoaded",()=>{const n=document.querySelectorAll("[data-invoice-view]");if(n.length===0)return;const c=document.querySelectorAll("[data-invoice-view-show]"),s=e=>{c.forEach(t=>{const i=t.dataset.invoiceViewShow===e;t.style.display=i?"":"none"}),n.forEach(t=>{const i=t.dataset.invoiceView===e;t.classList.toggle("active",i)});const o=new URL(window.location.href);o.searchParams.set("view",e),window.history.replaceState({},"",o.toString())};n.forEach(e=>{e.addEventListener("click",o=>{o.preventDefault(),s(e.dataset.invoiceView)})})});
