Detect navigation direction in canDeactivate

I have implemented a CanDeactivateGuard:

import { Injectable } from '@angular/core';
import { CanDeactivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { IDeactivatableComponent } from './ideactivatable-component';

export class CanDeactivateGuard implements CanDeactivate<IDeactivatableComponent> {
    component: IDeactivatableComponent,
    route: ActivatedRouteSnapshot,
    state: RouterStateSnapshot
  ): Observable<boolean> | Promise<boolean> | boolean {
    return component.canDeactivate();

Now I want to detect if user is navigating forward or navigating back, because if the user is navigating forward the data is not lost (he will come back later to this route), but if user is navigating back data is lost, so in this case is when we want confirmation.

How can I detect in ActivatedRouteSnapshot or RouterStateSnapshot the navigation direction?

Thank you