import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { AgentService } from '../service/agent.service';
import { Observable } from 'rxjs';

@Injectable({ providedIn: 'root' })
export class CountryDataForWizardResolver implements Resolve<any> {
    
  constructor(private service: AgentService) {}

  resolve(
    route: ActivatedRouteSnapshot,
    state: RouterStateSnapshot
  ): Observable<any>|Promise<any>|any {

    return this.service.getCountryDataForWizard();
  }
}
