import { inject } from '@angular/core';
import { ResolveFn } from '@angular/router';
import { take } from 'rxjs/operators';

import { AeronefsPageData } from '@models';
import { PagesService } from '@services';

export const aeronefsPageResolver: ResolveFn<AeronefsPageData> = () => {
    return inject(PagesService).getAeronefsPage().pipe(take(1));
};