const REMEMBERED_EMAIL_KEY = 'rememberedEmail';

export function getRememberedEmail(): string {
  if (typeof window === 'undefined') return '';
  return localStorage.getItem(REMEMBERED_EMAIL_KEY) ?? '';
}

export function setRememberedEmail(email: string): void {
  localStorage.setItem(REMEMBERED_EMAIL_KEY, email);
}

export function clearRememberedEmail(): void {
  localStorage.removeItem(REMEMBERED_EMAIL_KEY);
}
