export const Scroll = {
  positionY: 0,

  freeze(): void {
    this.positionY = window.scrollY;

    document.documentElement.style.height = "100%";
    document.documentElement.style.overflow = "hidden";
    document.body.style.bottom = this.positionY + "px";
  },

  resume(): void {
    document.documentElement.style.height = "";
    document.documentElement.style.overflow = "";
    document.body.style.bottom = "";
    window.scrollTo(0, this.positionY);
  }
};
