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

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

import { PopupsResolver, PopupResolver } from './resolvers/popup.resolver';
import { ReditComponent } from './components/redit.component';
import { ViewComponent } from './components/view.component';

export const popupRoutes: Route[] = [
  {
    path: '',
    pathMatch: 'full',
    redirectTo: 'list',
  },

  {
    path: 'list',
    component: ListComponent,
    resolve: {
      popups: PopupsResolver,
    },
  },
  {
    path: 'redit',
    component: ReditComponent,
  },
  {
    path: 'redit/:id',
    component: ReditComponent,
    resolve: {
      popup: PopupResolver,
    },
  },

  {
    path: 'view/:id',
    component: ViewComponent,
    resolve: {
      popup: PopupResolver,
    },
  },

  // {
  //   path: 'redit',
  //   component: ReditComponent,
  // },
  // {
  //   path: 'redit/:id',
  //   component: ReditComponent,
  //   resolve: {
  //     customerTemplates: CustomerTemplateResolver,
  //   },
  // },
];
