import { inject } from '@angular/core';
import { Router } from '@angular/router';

export class AuthService {
  private router = inject(Router);

  logout() {
    localStorage.removeItem('token');
    this.router.navigate(['/signin']);
  }

  isAuthenticated(): boolean {
    return !!localStorage.getItem('token');
  }
} 