import { inject, Injectable } from '@angular/core';
import { CanActivate } from '@angular/router';
import { AuthService } from '../services/auth.service';

@Injectable({
  providedIn: 'root',
})
export class LoggedInGuard implements CanActivate {
  private auth = inject(AuthService);
  canActivate(): boolean {
    return this.auth.jwt() !== null;
  }
}
