import { Routes } from '@angular/router';
import { RemissionListComponent } from './remission-list.component';
import { querySettingsResolverFn } from './resolvers/query-settings.resolver-fn';
import { querySettingsDepartmentResolverFn } from './resolvers/query-settings-department.resolver-fn';
import { RemissionListType } from '@isa/remission/data-access';

export const routes: Routes = [
  {
    path: 'mandatory',
    component: RemissionListComponent,
    resolve: { querySettings: querySettingsResolverFn },
    title: 'Remission - Pflicht',
    data: {
      scrollPositionRestoration: true,
      remiType: RemissionListType.Pflicht,
    },
  },
  {
    path: 'department',
    component: RemissionListComponent,
    resolve: { querySettings: querySettingsDepartmentResolverFn },
    title: 'Remission - Abteilung',
    data: {
      scrollPositionRestoration: true,
      remiType: RemissionListType.Abteilung,
    },
  },
  {
    path: '',
    redirectTo: 'mandatory',
    pathMatch: 'full',
  },
];
