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

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

export const dropZonesPageResolver: ResolveFn<DropZonesPageData> = () => {
    return inject(PagesService).getDropZonesPage().pipe(take(1));
};