import { CanDeactivateFn } from '@angular/router';
import { inject } from '@angular/core';
import { FileAttributesService } from '@services/entity-services/file-attributes.service';
import { DossierOverviewScreenComponent } from '../modules/dossier-overview/screen/dossier-overview-screen.component';

export const editAttributeGuard: CanDeactivateFn<DossierOverviewScreenComponent> = () =>
    !inject(FileAttributesService).isEditingFileAttribute();
