import { CanActivateFn } from '@angular/router';
import { inject } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';


export const authGuard: CanActivateFn = (route, state) => {
    const authService = inject(OAuthService);
    return authService.hasValidAccessToken(); // returns boolean, Promise, or Observable
};
