import { Routes } from '@angular/router';
import { CoreCommandModule } from '@core/command';
import { OMS_ACTION_HANDLERS } from '@isa/oms/data-access';
import { canDeactivateTabCleanup } from '@isa/core/tabs';

export const routes: Routes = [
  {
    path: ':displayOrderIds',
    title: 'Prämienshop - Bestellbestätigung',
    providers: [
      CoreCommandModule.forChild(OMS_ACTION_HANDLERS).providers ?? [],
    ],
    loadComponent: () =>
      import('./reward-order-confirmation.component').then(
        (m) => m.RewardOrderConfirmationComponent,
      ),
    canDeactivate: [canDeactivateTabCleanup],
  },
];
