import { INPUT_LIFT_VAR, KEYBOARD_VAR, VIEWPORT_VAR } from "./constants";

export function setKeyboardHeightVar(height: number): void {
  document.documentElement.style.setProperty(KEYBOARD_VAR, `${height}px`);
}

export function setViewportHeightVar(height: number): void {
  document.documentElement.style.setProperty(VIEWPORT_VAR, `${height}px`);
}

export function setInputLiftVar(lift: number): void {
  document.documentElement.style.setProperty(INPUT_LIFT_VAR, `${lift}px`);
}

export function resetKeyboardVars(): void {
  document.documentElement.style.setProperty(KEYBOARD_VAR, "0px");
  document.documentElement.style.setProperty(VIEWPORT_VAR, "100dvh");
  document.documentElement.style.setProperty(INPUT_LIFT_VAR, "0px");
}
