function toThaiSlug(str) {
    str = str.toLowerCase();

    str = str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");

    str = str.replace(/[đĐ]/g, "d");

    str = str.replace(/([^0-9a-z-\s])/g, "");

    str = str.replace(/(\s+)/g, "-");

    str = str.replace(/-+/g, "-");

    str = str.replace(/^-+|-+$/g, "");

    return str;
}

// Function to convert input string to its Thai equivalent URI
function toThaiUri(input) {
    if (URI_LANG[input]) {
        return URI_LANG[input];
    }

    return input;
}

// TODO: Hiden conent sclassRule
function removeDataContentWithDelay(delays) {
    let sclassRule = document.querySelector("#sclassRule");
    if (sclassRule) {
        delays.forEach((delay) => {
            setTimeout(() => {
                sclassRule.innerHTML = "";
            }, delay);
        });
    }
}

const delays = [500, 1000, 2000];
removeDataContentWithDelay(delays);
