import { Injectable } from '@angular/core';

@Injectable({
    providedIn: 'root'
})
export class LocalStorageService {

    private readonly AUTH_TOKEN_KEY = 'auth_token';

    constructor() { }

    setToken(token: string): void {
        localStorage.setItem(this.AUTH_TOKEN_KEY, token);
    }

    getToken(): string | null {
        return localStorage.getItem(this.AUTH_TOKEN_KEY);
    }

    removeToken(): void {
        localStorage.removeItem(this.AUTH_TOKEN_KEY);
    }
}