import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { SavedComponent } from './saved/saved.component';
import { ShareComponent } from './share/share.component';
import { IdoComponent } from './ido/ido.component';
import { AddComponent } from './add/add.component';

export const APP_ROUTES: Routes = [
  { path: 'ido', component: IdoComponent },
  { path: 'saved', component: SavedComponent },
  { path: 'share/:line1/:line2/:line3', component: ShareComponent },
  { path: '**', component: IdoComponent },
];

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