"use strict";$((function(){var t="rtl"===$("html").attr("dir")?"rtl":"ltr";$("#paymentStatus").select2({dir:t,dropdownAutoWidth:!0}),$("#paymentMethod").select2({dir:t,dropdownAutoWidth:!0}),$("#invoiceDate").datepicker({})}));let itemCount=1;function addDeleteFunctionality(){document.querySelectorAll(".delete-row").forEach((t=>{t.onclick=function(){this.closest("tr").remove()}}))}document.querySelector("#addItemBtn").addEventListener("click",(function(){itemCount++;const t=document.querySelector("table tbody"),e=document.createElement("tr");e.innerHTML=`\n            <td>${itemCount.toString().padStart(2,"0")}</td>\n            <td>\n                <input type="text" id="product-details-${itemCount}" class="form-control mb-2" placeholder="Product ${itemCount}">\n                <input type="text" id="product-desc-${itemCount}" class="form-control" placeholder="Item description">\n            </td>\n            <td><input type="number" id="product-category-${itemCount}" class="form-control" placeholder="Quantity"></td>\n            <td><input type="number" id="product-price-${itemCount}" class="form-control" placeholder="Price"></td>\n            <td><input type="number" id="product-Amount-${itemCount}" class="form-control" placeholder="$0.00"></td>\n            <td>\n                <button type="button" class="btn btn-sm btn-label-danger btn-icon delete-row" aria-label="Delete">\n                    <i data-eva="trash-2-outline"></i>\n                </button>\n            </td>\n        `,t.appendChild(e),window.eva&&eva.replace(),addDeleteFunctionality()})),addDeleteFunctionality();