import { postData } from "./client.js";

document.querySelectorAll(".visibilityRestriction").forEach(async el => {
    el.style.display = "none";
});

const user = await postData("/getInfo", {}, window.localStorage.getItem("token"));

document.querySelectorAll(".visibilityRestriction").forEach(async el => {
    if (user.Role === el.dataset.role) {
        el.style.display = "";
    } else {
        el.style.display = "none";
    }
});
