window.initializeReportingOverlayItemEvent = n => {
    n.onclick || n.addEventListener("click", function(t) {
        if (t.target.closest(["a", "button", ".copy_account_number_button", ".copy-btn"])) {
            t.stopPropagation();
            return
        }
        const r = n.dataset.identifier
          , i = document.querySelector(`[data-reporting-detail][data-identifier="${r}"]`);
        if (i) {
            document.body.classList.add("no-scroll");
            i.classList.add("open");
            const n = i.querySelector(".close_reporting_detail_button");
            n && (n.onclick = () => {
                document.body.classList.remove("no-scroll"),
                i.classList.remove("open")
            }
            )
        }
    })
}
;
window.initializeReportingPopupItemEvent = n => {
    n.onclick || (n.onclick = () => {
        const i = n.dataset.identifier
          , t = document.querySelector(`[data-reporting-detail-popup][data-identifier="${i}"]`);
        if (t) {
            t.classList.add("open");
            const n = t.querySelector(".close_reporting_detail_popup");
            n && (n.onclick = () => {
                t.classList.remove("open")
            }
            )
        }
    }
    )
}
;
window.initializePendingTransactionDetail = () => {
    const n = document.querySelectorAll("[data-pending-transaction-info-header]");
    n && n.length > 0 && (Array.from(n).forEach(n => {
        n.onclick || (n.onclick = () => {
            n.parentElement.classList.toggle("open")
        }
        )
    }
    ),
    initializeCopyButton())
}
;
window.addEventListener("DOMContentLoaded", () => {
    const n = document.querySelectorAll("[data-reporting-item]");
    n && n.length > 0 && Array.from(n).forEach(n => {
        window.initializeReportingOverlayItemEvent(n)
    }
    );
    const t = document.querySelectorAll("[data-reporting-row]");
    t && t.length > 0 && Array.from(t).forEach(n => {
        initializeReportingPopupItemEvent(n)
    }
    );
    initializePendingTransactionDetail()
}
);
