import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {ListComponent} from "./pages/list/list.component";
import {AddComponent} from "./pages/add/add.component";
import {EditComponent} from "./pages/edit/edit.component";
import {ExploreComponent} from "./pages/explore/explore.component";
import {MixEditComponent} from "./pages/mix/mix-edit/mix-edit.component";
import {MixAddComponent} from "./pages/mix/mix-add/mix-add.component";

const routes: Routes = [{
  path: 'list',
  component: ListComponent
}, {
  path: 'add',
  component: AddComponent
}, {
  path: 'edit/:id',
  component: EditComponent
}, {
  path: 'add/mix/:recipeId',
  component: MixAddComponent
}, {
  path: 'edit/mix/:recipeId/:id',
  component: MixEditComponent
}, {
  path: 'explore/:id',
  component: ExploreComponent
}, {
  path: '',
  pathMatch: 'full',
  redirectTo: 'list'
}]

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