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

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

import {
  NoticeOnelinesResolver,
  NoticeOnelineResolver,
} from './resolvers/notice-oneline.resolver';

export const noticeOnelineRoutes: Route[] = [
  {
    path: '',
    pathMatch: 'full',
    redirectTo: 'list',
  },
  {
    path: 'list',
    component: ListComponent,
    resolve: {
      noticeOnelines: NoticeOnelinesResolver,
    },
  },
  {
    path: 'redit',
    component: ReditComponent,
  },
  {
    path: 'redit/:id',
    component: ReditComponent,
    resolve: {
      noticeOneline: NoticeOnelineResolver,
    },
  },
];
