import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UploadComponent } from './upload.component';
import { CanDeactivateGuard, PlayComponent } from './play.component';
import { CheckerComponent } from './checker.component';
import { PotraceComponent } from './potrace.component';
import { ColorMergeComponent } from './color-merge.component';
import { SvgComponent } from './svg.component';
import { PrecheckerComponent } from './prechecker.component';
import { SegmentComponent } from './segment.component';
import { Svg2Component } from './svg2.component';
import { Svg3Component } from './svg3.component';


const routes: Routes = [{
  path: '',
  children: [

    { path: 'svg/:id', component: SvgComponent, canDeactivate: [] },
    { path: 'svg2/:id', component: Svg2Component, canDeactivate: [] },
    { path: 'svg3/:id', component: Svg3Component, canDeactivate: [] },
    { path: 'color-merge/:id', component: ColorMergeComponent, canDeactivate: [] },
    { path: 'potrace', component: PotraceComponent, canDeactivate: [] },
    { path: 'checker', component: CheckerComponent, canDeactivate: [] },
    { path: 'checker/:id', component: CheckerComponent, canDeactivate: [] },
    { path: 'upload', component: UploadComponent, canDeactivate: [] },
    { path: 'play', component: PlayComponent, canDeactivate: [] },
    { path: 'play/:id', component: PlayComponent, canDeactivate: [] },
    { path: 'play/:id/:edit', component: PlayComponent, canDeactivate: [] },
    { path: 'precheck', component: PrecheckerComponent, canDeactivate: [] },
    { path: 'segment', component: SegmentComponent, canDeactivate: [] },
    { path: '**', redirectTo: 'list' }
  ]
}];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class ArtRoutingModule { }
