export class CollapsibleTableHandler {
    constructor(containerSelector = ".collapsible_table") {
        const tables = document.querySelectorAll(containerSelector);
        tables.forEach((table) => {
            const header = table.querySelector(".collapsible_table--header");
            const content = table.querySelector(".collapsible_table--content");
            const flipper = table.querySelector(".flipper--down, .flipper--up");
            if (!header || !content)
                return;
            header.addEventListener("click", () => {
                content.classList.toggle("expanded");
                if (flipper) {
                    flipper.classList.toggle("flipper--up");
                    flipper.classList.toggle("flipper--down");
                }
            });
        });
    }
}
//# sourceMappingURL=CollapsibleTableHandler.js.map