import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {HomeComponent} from "./home/home.component";
import {ViewSuspiciousScoresComponent} from "./view-suspicious-scores/view-suspicious-scores.component";
import {ViewSimilarReplaysComponent} from "./view-similar-replays/view-similar-replays.component";
import {ViewScoreComponent} from "./view-score/view-score.component";
import {ViewUserComponent} from "./view-user/view-user.component";
import {ViewReplayPairComponent} from "./view-replay-pair/view-replay-pair.component";
import {SearchComponent} from "./search/search.component";
import {ViewUserScoreComponent} from "./view-user-score/view-user-score.component";

const routes: Routes = [
  {path: 'sus/:f', component: ViewSuspiciousScoresComponent,  title: '/sus/'},
  {path: 'sus', component: ViewSuspiciousScoresComponent,  title: '/sus/'},

  {path: 'stolen', component: ViewSimilarReplaysComponent,  title: '/nu/'},
  {path: 'stolen/:f', component: ViewSimilarReplaysComponent,  title: '/nu/'},

  {path: 'u/:userId', component: ViewUserComponent},
  {path: 's/:replayId', component: ViewScoreComponent},
  {path: 'search', component: SearchComponent},
  {path: 'p/:replay1Id/:replay2Id', component: ViewReplayPairComponent},

  {path: 'c/:replayId', component: ViewUserScoreComponent},

  {path: '**', component: HomeComponent, title: '/nise.moe/'},
];

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