document.addEventListener("DOMContentLoaded", function () {
    // Check for the specific query parameter
    const urlParams = new URLSearchParams(window.location.search);
    const triggerParam = urlParams.get("open_installation"); // Replace "open_installation" with your desired parameter

    // If the parameter exists and is set to "true"
    if (triggerParam === "true") {
        // Step 1: Select the checkbox input associated with the "Installation" section
        const installationCheckbox = document.getElementById("my-esims-page-list-installation");

        // Step 2: Automatically check the checkbox if it exists
        if (installationCheckbox) {
            installationCheckbox.checked = true; // Open the "Installation" section
        }

        // Step 3: Scroll to the Installation section
        const installationLabel = document.querySelector('label[for="my-esims-page-list-installation"]');
        if (installationLabel) {
            installationLabel.scrollIntoView({ behavior: "smooth", block: "start" });
        }
    }
});
