const KEY = 'auth_token';

export const tokenStore = {
  getToken(): string | null {
    try {
      return localStorage.getItem(KEY);
    } catch {
      return null;
    }
  },
  setToken(token: string): void {
    try {
      localStorage.setItem(KEY, token);
    } catch {}
  },
  clear(): void {
    try {
      localStorage.removeItem(KEY);
    } catch {}
  },
};
