import { Route } from '@angular/router';

import { ListComponent } from './components/list.component';
import { ViewComponent } from '../user/components/view.component';

import { CouponsResolver } from './resolvers/coupon.resolver';
import { UserResolver } from '../user/resolvers/user.resolver';

export const CouponRoutes: Route[] = [
  {
    path: '',
    component: ListComponent,
    resolve: {
      Coupons: CouponsResolver,
    },
  },
  {
    path: ':id',
    component: ViewComponent,
    resolve: {
      users: UserResolver,
    },
  },
];
